@abi-software/scaffoldvuer 1.6.0 → 1.6.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.js +17 -21
- package/dist/scaffoldvuer.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/ScaffoldVuer.vue +16 -12
- package/src/scripts/Search.js +0 -1
package/dist/scaffoldvuer.js
CHANGED
|
@@ -41593,7 +41593,7 @@ class HU {
|
|
|
41593
41593
|
}
|
|
41594
41594
|
search(e) {
|
|
41595
41595
|
let t;
|
|
41596
|
-
e.length > 2 && ["'", '"'].includes(e.slice(0, 1)) ? (e = e.replaceAll(e.slice(0, 1), ""),
|
|
41596
|
+
e.length > 2 && ["'", '"'].includes(e.slice(0, 1)) ? (e = e.replaceAll(e.slice(0, 1), ""), t = this._searchEngine.search(e, { prefix: !0, combineWith: "AND" })) : e.length > 1 && (t = this._searchEngine.search(e, { prefix: !0 }));
|
|
41597
41597
|
const i = [];
|
|
41598
41598
|
return t.forEach((r) => {
|
|
41599
41599
|
r.id in this.idMaps && i.push(this.idMaps[r.id].zincObject);
|
|
@@ -42394,7 +42394,7 @@ const WU = {
|
|
|
42394
42394
|
* @arg {String} `icon`
|
|
42395
42395
|
*/
|
|
42396
42396
|
toggleDrawing: function(n, e) {
|
|
42397
|
-
this.createData.toBeDeleted = !1, n === "mode" ? (this.cancelCreate(), this.activeDrawMode = e, this.createData.shape = "", this.$module.selectObjectOnPick = !0) : n === "tool" && (this.activeDrawTool = e, this.createData.shape = this.activeDrawTool, this.$module.selectObjectOnPick = !1);
|
|
42397
|
+
this.createData.toBeDeleted = !1, n === "mode" ? (this.cancelCreate(), this.activeDrawMode = e, this.createData.shape = "", this.$module.selectObjectOnPick = !0) : n === "tool" && (this.activeDrawTool = e, this.createData.shape = this.activeDrawTool ? this.activeDrawTool : "", this.$module.selectObjectOnPick = !1);
|
|
42398
42398
|
},
|
|
42399
42399
|
/**
|
|
42400
42400
|
* Toggle the drawing box which aid the drawing
|
|
@@ -42515,25 +42515,21 @@ const WU = {
|
|
|
42515
42515
|
if (!(this.createData.toBeConfirmed || this.createData.toBeDeleted)) {
|
|
42516
42516
|
const e = [];
|
|
42517
42517
|
let t = [];
|
|
42518
|
-
|
|
42519
|
-
if (
|
|
42520
|
-
let
|
|
42521
|
-
e.push(
|
|
42522
|
-
}
|
|
42523
|
-
}), t = n.zincObjects), n.eventType == 1)
|
|
42524
|
-
this.viewingMode === "Annotation" ? this.activateAnnotationMode(e, n) : (this.$refs.scaffoldTreeControls && (e.length > 0 ? (this.$refs.scaffoldTreeControls.updateActiveUI(t), this.updatePrimitiveControls(t)) : (this.hideRegionTooltip(), this.$refs.scaffoldTreeControls.removeActive(!1))), n.identifiers.length === 1 ? (this.lastSelected.isSearch = !1, this.lastSelected.region = n.identifiers[0].data.region, this.lastSelected.group = n.identifiers[0].data.group) : n.identifiers.length === 0 && (this.lastSelected.isSearch = !1, this.lastSelected.region = "", this.lastSelected.group = ""), this.$emit("scaffold-selected", n.identifiers));
|
|
42525
|
-
else if (n.eventType == 2) {
|
|
42526
|
-
if (this.selectedObjects.length === 0) {
|
|
42527
|
-
if (this.hideRegionTooltip(), this.$refs.scaffoldTreeControls && (e.length > 0 ? this.$refs.scaffoldTreeControls.updateHoverUI(t) : this.$refs.scaffoldTreeControls.removeHover(!0)), n.identifiers.length > 0 && n.identifiers[0]) {
|
|
42528
|
-
let i = n.identifiers[0].data.id ? n.identifiers[0].data.id : n.identifiers[0].data.group;
|
|
42529
|
-
n.identifiers[0].coords && (this.tData.active = !1, this.annotationSidebar || (this.tData.visible = !0), this.tData.label = i, n.identifiers[0].data.region ? this.tData.region = n.identifiers[0].data.region : this.tData.region = void 0, this.tData.x = n.identifiers[0].coords.x, this.tData.y = n.identifiers[0].coords.y, this.createEditTemporaryLines(n.identifiers));
|
|
42530
|
-
}
|
|
42531
|
-
this.$emit("scaffold-highlighted", n.identifiers);
|
|
42518
|
+
(n.eventType == 1 || n.eventType == 2) && (n.identifiers.forEach((s) => {
|
|
42519
|
+
if (s) {
|
|
42520
|
+
let o = s.data.id ? s.data.id : s.data.group;
|
|
42521
|
+
e.push(o);
|
|
42532
42522
|
}
|
|
42533
|
-
}
|
|
42523
|
+
}), t = n.zincObjects);
|
|
42524
|
+
let i, r;
|
|
42525
|
+
if (n.identifiers.length > 0 && n.identifiers[0] && (i = n.identifiers[0].data.id ? n.identifiers[0].data.id : n.identifiers[0].data.group, n.identifiers[0].data.region && (r = n.identifiers[0].data.region)), n.eventType == 1)
|
|
42526
|
+
this.viewingMode === "Annotation" ? (this.tData.label = i, this.tData.region = r, this.activateAnnotationMode(e, n)) : (this.$refs.scaffoldTreeControls && (e.length > 0 ? (this.$refs.scaffoldTreeControls.updateActiveUI(t), this.updatePrimitiveControls(t)) : (this.hideRegionTooltip(), this.$refs.scaffoldTreeControls.removeActive(!1))), n.identifiers.length === 1 ? (this.lastSelected.isSearch = !1, this.lastSelected.region = r, this.lastSelected.group = n.identifiers[0].data.group) : n.identifiers.length === 0 && (this.lastSelected.isSearch = !1, this.lastSelected.region = "", this.lastSelected.group = ""), this.$emit("scaffold-selected", n.identifiers));
|
|
42527
|
+
else if (n.eventType == 2)
|
|
42528
|
+
this.selectedObjects.length === 0 && (this.hideRegionTooltip(), this.$refs.scaffoldTreeControls && (e.length > 0 ? this.$refs.scaffoldTreeControls.updateHoverUI(t) : this.$refs.scaffoldTreeControls.removeHover(!0)), n.identifiers.length > 0 && n.identifiers[0] && n.identifiers[0].coords && (this.tData.active = !1, (!this.viewingMode !== "Annotation" || !this.annotationSidebar) && (this.tData.visible = !0), this.tData.label = i, this.tData.region = r, this.tData.x = n.identifiers[0].coords.x, this.tData.y = n.identifiers[0].coords.y, this.createEditTemporaryLines(n.identifiers)), this.$emit("scaffold-highlighted", n.identifiers));
|
|
42529
|
+
else if (n.eventType == 3 && n.identifiers.length > 0 && n.identifiers[0]) {
|
|
42534
42530
|
if (n.identifiers[0].coords) {
|
|
42535
|
-
const
|
|
42536
|
-
this.tData.x = n.identifiers[0].coords.x -
|
|
42531
|
+
const s = this.$refs.scaffoldContainer.getBoundingClientRect();
|
|
42532
|
+
this.tData.x = n.identifiers[0].coords.x - s.left, this.tData.y = n.identifiers[0].coords.y - s.top;
|
|
42537
42533
|
}
|
|
42538
42534
|
this.createEditTemporaryLines(n.identifiers);
|
|
42539
42535
|
}
|
|
@@ -43095,7 +43091,7 @@ const WU = {
|
|
|
43095
43091
|
this.setMarkerModeForObjectsWithName(n, e, "on");
|
|
43096
43092
|
}
|
|
43097
43093
|
}
|
|
43098
|
-
}, kp = (n) => (p1("data-v-
|
|
43094
|
+
}, kp = (n) => (p1("data-v-421c0aa2"), n = n(), m1(), n), jU = {
|
|
43099
43095
|
ref: "scaffoldContainer",
|
|
43100
43096
|
class: "scaffold-container",
|
|
43101
43097
|
"element-loading-text": "Loading...",
|
|
@@ -43552,7 +43548,7 @@ function o4(n, e, t, i, r, s) {
|
|
|
43552
43548
|
[M, n.loading]
|
|
43553
43549
|
]);
|
|
43554
43550
|
}
|
|
43555
|
-
const u4 = /* @__PURE__ */ wr(WU, [["render", o4], ["__scopeId", "data-v-
|
|
43551
|
+
const u4 = /* @__PURE__ */ wr(WU, [["render", o4], ["__scopeId", "data-v-421c0aa2"]]);
|
|
43556
43552
|
export {
|
|
43557
43553
|
u4 as ScaffoldVuer
|
|
43558
43554
|
};
|