Multiple item conditional styles (#3017)

Conditional Styles for multiple items #3076

* Preview condition styles on selecting that condition or one of it's styles
Do not evaluate conditional styles in edit mode

* Conditions styling tweaked

- Condition match `is-current` styling for browse and edit modes;
- Disallowed pointer events on Conditions to prevent selection in
Inspector when not editing;

* Highlight current condition in conditionSet view

* Addresses review comments.

* Condition matching highlighting tweaked

- Enable match highlighting during Editing;
- Tweaks to `is-current` styling;

* Don't reset the callback on destroy

* Combine multiple and single selection styling of objects

* Fix issue with applying styles in edit mode

* Fix item styles bug

* Remove comment

* Adds back visibility toggle

* Set isEditing on initialization.

* Addresses review comments - removes use of lodash.

Co-authored-by: charlesh88 <charlesh88@gmail.com>
Co-authored-by: Deep Tailor <deep.j.tailor@nasa.gov>
This commit is contained in:
Shefali Joshi
2020-06-01 12:40:40 -07:00
committed by GitHub
parent ab463e93fe
commit d5480e7524
4 changed files with 619 additions and 8 deletions

View File

@@ -25,8 +25,7 @@
</template>
<script>
import ConditionalStylesView from '../../plugins/condition/components/inspector/ConditionalStylesView.vue';
import MultiSelectStylesView from '../../plugins/condition/components/inspector/MultiSelectStylesView.vue';
import StylesView from '../../plugins/condition/components/inspector/StylesView.vue';
import Vue from 'vue';
export default {
@@ -46,7 +45,6 @@ export default {
methods: {
updateSelection(selection) {
if (selection.length > 0 && selection[0].length > 0) {
let template = selection.length > 1 ? '<multi-select-styles-view></multi-select-styles-view>' : '<conditional-styles-view></conditional-styles-view>';
if (this.component) {
this.component.$destroy();
this.component = undefined;
@@ -61,10 +59,9 @@ export default {
},
el: viewContainer,
components: {
ConditionalStylesView,
MultiSelectStylesView
StylesView
},
template: template
template: '<styles-view/>'
});
}
}