@abi-software/scaffoldvuer 0.1.5-1.beta.0 → 0.1.5-1.beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/scaffoldvuer.common.js +71 -85
- package/dist/scaffoldvuer.common.js.map +1 -1
- package/dist/scaffoldvuer.css +1 -1
- package/dist/scaffoldvuer.umd.js +71 -85
- package/dist/scaffoldvuer.umd.js.map +1 -1
- package/dist/scaffoldvuer.umd.min.js +1 -1
- package/dist/scaffoldvuer.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/ScaffoldVuer.vue +18 -16
- package/src/components/TraditionalControls.vue +15 -25
package/package.json
CHANGED
|
@@ -721,9 +721,9 @@ export default {
|
|
|
721
721
|
let id = event.identifiers[0].data.id
|
|
722
722
|
? event.identifiers[0].data.id
|
|
723
723
|
: event.identifiers[0].data.group;
|
|
724
|
-
this.$refs.traditionalControl.changeActiveByName(id);
|
|
724
|
+
this.$refs.traditionalControl.changeActiveByName(id, true);
|
|
725
725
|
} else {
|
|
726
|
-
this.$refs.traditionalControl.removeActive();
|
|
726
|
+
this.$refs.traditionalControl.removeActive(true);
|
|
727
727
|
}
|
|
728
728
|
}
|
|
729
729
|
/**
|
|
@@ -739,8 +739,8 @@ export default {
|
|
|
739
739
|
let id = event.identifiers[0].data.id
|
|
740
740
|
? event.identifiers[0].data.id
|
|
741
741
|
: event.identifiers[0].data.group;
|
|
742
|
-
this.$refs.traditionalControl.changeHoverByName(id);
|
|
743
|
-
} else this.$refs.traditionalControl.removeHover();
|
|
742
|
+
this.$refs.traditionalControl.changeHoverByName(id, true);
|
|
743
|
+
} else this.$refs.traditionalControl.removeHover(true);
|
|
744
744
|
}
|
|
745
745
|
/**
|
|
746
746
|
* Triggers when an object has been highlighted
|
|
@@ -785,12 +785,12 @@ export default {
|
|
|
785
785
|
*
|
|
786
786
|
* @param {object} object Zinc object
|
|
787
787
|
*/
|
|
788
|
-
objectSelected: function(object) {
|
|
788
|
+
objectSelected: function(object, propagate) {
|
|
789
789
|
if (object !== this.selectedObject) {
|
|
790
790
|
this.selectedObject = object;
|
|
791
791
|
this.$refs.opacityControl.setObject(this.selectedObject);
|
|
792
|
-
if (object) this.$module.setSelectedByZincObject(object,
|
|
793
|
-
else this.$module.setSelectedByObjects([],
|
|
792
|
+
if (object) this.$module.setSelectedByZincObject(object, propagate);
|
|
793
|
+
else this.$module.setSelectedByObjects([], propagate);
|
|
794
794
|
}
|
|
795
795
|
},
|
|
796
796
|
/**
|
|
@@ -798,11 +798,11 @@ export default {
|
|
|
798
798
|
*
|
|
799
799
|
* @param {object} object Zinc object
|
|
800
800
|
*/
|
|
801
|
-
objectHovered: function(object) {
|
|
801
|
+
objectHovered: function(object, propagate) {
|
|
802
802
|
if (object !== this.hoveredObject) {
|
|
803
803
|
this.hoveredObject = object;
|
|
804
|
-
if (object) this.$module.setHighlightedByZincObject(object,
|
|
805
|
-
else this.$module.setHighlightedByObjects([],
|
|
804
|
+
if (object) this.$module.setHighlightedByZincObject(object, propagate);
|
|
805
|
+
else this.$module.setHighlightedByObjects([], propagate);
|
|
806
806
|
}
|
|
807
807
|
},
|
|
808
808
|
/**
|
|
@@ -810,20 +810,22 @@ export default {
|
|
|
810
810
|
*
|
|
811
811
|
* @param {name} name Name of the region
|
|
812
812
|
*/
|
|
813
|
-
changeActiveByName: function(name) {
|
|
814
|
-
this.$refs.traditionalControl.changeActiveByName(name);
|
|
813
|
+
changeActiveByName: function(name, propagate) {
|
|
815
814
|
if (name === undefined)
|
|
816
|
-
this.$refs.traditionalControl.removeActive();
|
|
815
|
+
this.$refs.traditionalControl.removeActive(propagate);
|
|
816
|
+
else
|
|
817
|
+
this.$refs.traditionalControl.changeActiveByName(name, propagate);
|
|
817
818
|
},
|
|
818
819
|
/**
|
|
819
820
|
* Set the highlighted by name.
|
|
820
821
|
*
|
|
821
822
|
* @param {name} name Name of the region
|
|
822
823
|
*/
|
|
823
|
-
changeHighlightedByName: function(name) {
|
|
824
|
-
this.$refs.traditionalControl.changeHoverByName(name);
|
|
824
|
+
changeHighlightedByName: function(name, propagate) {
|
|
825
825
|
if (name === undefined)
|
|
826
|
-
this.$refs.traditionalControl.removeHover();
|
|
826
|
+
this.$refs.traditionalControl.removeHover(propagate);
|
|
827
|
+
else
|
|
828
|
+
this.$refs.traditionalControl.changeHoverByName(name, propagate);
|
|
827
829
|
},
|
|
828
830
|
/**
|
|
829
831
|
* Start the animation.
|
|
@@ -153,51 +153,41 @@ export default {
|
|
|
153
153
|
/**
|
|
154
154
|
* Select a region by its name.
|
|
155
155
|
*/
|
|
156
|
-
changeActiveByName: function(name) {
|
|
156
|
+
changeActiveByName: function(name, propagate) {
|
|
157
157
|
let targetObject = this.getFirstZincObjectWithGroupName(name);
|
|
158
158
|
if (targetObject && targetObject.getVisibility()) {
|
|
159
159
|
this.activeRegion = name;
|
|
160
|
-
|
|
161
|
-
* Triggers when an item has been selected.
|
|
162
|
-
*
|
|
163
|
-
* @property {object} target selected object.
|
|
164
|
-
*/
|
|
165
|
-
this.$emit("object-selected", targetObject);
|
|
160
|
+
this.$emit("object-selected", targetObject, propagate);
|
|
166
161
|
} else {
|
|
167
|
-
this.removeActive();
|
|
162
|
+
this.removeActive(propagate);
|
|
168
163
|
}
|
|
169
|
-
this.removeHover();
|
|
164
|
+
this.removeHover(propagate);
|
|
170
165
|
},
|
|
171
166
|
/**
|
|
172
167
|
* Hover a region by its name.
|
|
173
168
|
*/
|
|
174
|
-
changeHoverByName: function(name) {
|
|
169
|
+
changeHoverByName: function(name, propagate) {
|
|
175
170
|
let targetObject = this.getFirstZincObjectWithGroupName(name);
|
|
176
171
|
if (targetObject) {
|
|
177
172
|
this.hoverRegion = name;
|
|
178
|
-
|
|
179
|
-
* Triggers when an item has been hovered over.
|
|
180
|
-
*
|
|
181
|
-
* @property {object} target hovered object.
|
|
182
|
-
*/
|
|
183
|
-
this.$emit("object-hovered", targetObject);
|
|
173
|
+
this.$emit("object-hovered", targetObject, propagate);
|
|
184
174
|
} else {
|
|
185
|
-
this.removeHover();
|
|
175
|
+
this.removeHover(propagate);
|
|
186
176
|
}
|
|
187
177
|
},
|
|
188
178
|
/**
|
|
189
179
|
* Unselect the current selected region.
|
|
190
180
|
*/
|
|
191
|
-
removeActive: function() {
|
|
181
|
+
removeActive: function(propagate) {
|
|
192
182
|
this.activeRegion = "";
|
|
193
|
-
this.$emit("object-selected", undefined);
|
|
183
|
+
this.$emit("object-selected", undefined, propagate);
|
|
194
184
|
},
|
|
195
185
|
/**
|
|
196
186
|
* Unselect the current hover region.
|
|
197
187
|
*/
|
|
198
|
-
removeHover: function() {
|
|
188
|
+
removeHover: function(propagate) {
|
|
199
189
|
this.hoverRegion = "";
|
|
200
|
-
this.$emit("object-hovered", undefined);
|
|
190
|
+
this.$emit("object-hovered", undefined, propagate);
|
|
201
191
|
},
|
|
202
192
|
/**
|
|
203
193
|
* Reset the controls.
|
|
@@ -240,7 +230,7 @@ export default {
|
|
|
240
230
|
}
|
|
241
231
|
},
|
|
242
232
|
checkboxHover: function(name) {
|
|
243
|
-
this.changeHoverByName(name);
|
|
233
|
+
this.changeHoverByName(name, true);
|
|
244
234
|
},
|
|
245
235
|
itemClicked: function(name, event) {
|
|
246
236
|
if (
|
|
@@ -249,7 +239,7 @@ export default {
|
|
|
249
239
|
event.target.classList.contains("el-checkbox__original")
|
|
250
240
|
)
|
|
251
241
|
) {
|
|
252
|
-
this.changeActiveByName(name);
|
|
242
|
+
this.changeActiveByName(name, true);
|
|
253
243
|
event.preventDefault();
|
|
254
244
|
}
|
|
255
245
|
},
|
|
@@ -276,10 +266,10 @@ export default {
|
|
|
276
266
|
this.module.changeOrganPartsVisibility(item, event);
|
|
277
267
|
if (event == false) {
|
|
278
268
|
if (this.activeRegion === item) {
|
|
279
|
-
this.removeActive();
|
|
269
|
+
this.removeActive(true);
|
|
280
270
|
}
|
|
281
271
|
if (this.hoverRegion === item) {
|
|
282
|
-
this.removeHover();
|
|
272
|
+
this.removeHover(true);
|
|
283
273
|
}
|
|
284
274
|
}
|
|
285
275
|
},
|