@abi-software/scaffoldvuer 1.11.0-demo.2 → 1.11.0-demo.3
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 +3088 -3074
- package/dist/scaffoldvuer.umd.cjs +157 -157
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/src/App.vue +1 -1
- package/src/components/ScaffoldVuer.vue +46 -24
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abi-software/scaffoldvuer",
|
|
3
|
-
"version": "1.11.0-demo.
|
|
3
|
+
"version": "1.11.0-demo.3",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"vue": "^3.4.21",
|
|
55
55
|
"vue-router": "^4.2.5",
|
|
56
56
|
"vue3-component-svg-sprite": "^0.0.1",
|
|
57
|
-
"zincjs": "^1.14.
|
|
57
|
+
"zincjs": "^1.14.3"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@vitejs/plugin-vue": "^4.6.2",
|
package/src/App.vue
CHANGED
|
@@ -290,7 +290,7 @@
|
|
|
290
290
|
ref="backgroundPopover"
|
|
291
291
|
:virtual-ref="backgroundIconRef"
|
|
292
292
|
placement="top-start"
|
|
293
|
-
width="
|
|
293
|
+
width="320"
|
|
294
294
|
:teleported="false"
|
|
295
295
|
trigger="click"
|
|
296
296
|
popper-class="background-popper non-selectable h-auto"
|
|
@@ -864,6 +864,7 @@ export default {
|
|
|
864
864
|
viewingMode: "Exploration",
|
|
865
865
|
viewingModes: {
|
|
866
866
|
"Exploration": "View and explore detailed visualization of 3D scaffolds",
|
|
867
|
+
"Neuron Connection": "Discover nerve connections by selecting a nerve and viewing its associated connections",
|
|
867
868
|
"Annotation": ['View feature annotations', 'Add, comment on and view feature annotations'],
|
|
868
869
|
},
|
|
869
870
|
openMapRef: undefined,
|
|
@@ -1041,6 +1042,11 @@ export default {
|
|
|
1041
1042
|
setCheckedRegions: function (data) {
|
|
1042
1043
|
this.checkedRegions = data;
|
|
1043
1044
|
},
|
|
1045
|
+
/**
|
|
1046
|
+
*
|
|
1047
|
+
* @param nerves array of nerve names, show all nerves if empty
|
|
1048
|
+
* @param processed boolean, whether unselect all checkboxes
|
|
1049
|
+
*/
|
|
1044
1050
|
zoomToNerves: function (nerves, processed = false) {
|
|
1045
1051
|
if (this.$module.scene) {
|
|
1046
1052
|
const idsList = [];
|
|
@@ -1050,30 +1056,35 @@ export default {
|
|
|
1050
1056
|
if (processed) {
|
|
1051
1057
|
region.hideAllPrimitives();
|
|
1052
1058
|
if (regionName === 'Nerves') {
|
|
1053
|
-
|
|
1054
|
-
const
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1059
|
+
if (nerves.length) {
|
|
1060
|
+
const ids = nerves.reduce((acc, nerve) => {
|
|
1061
|
+
const primitive = this.findObjectsWithGroupName(nerve)
|
|
1062
|
+
const ids = primitive.map((object) => {
|
|
1063
|
+
object.setVisibility(true);
|
|
1064
|
+
return `${object.region.uuid}/${object.uuid}`;
|
|
1065
|
+
});
|
|
1066
|
+
acc.push(...ids);
|
|
1067
|
+
return acc;
|
|
1068
|
+
}, []);
|
|
1069
|
+
idsList.push(...ids)
|
|
1070
|
+
} else {
|
|
1071
|
+
region.showAllPrimitives();
|
|
1072
|
+
idsList.push(region.uuid)
|
|
1073
|
+
}
|
|
1063
1074
|
}
|
|
1064
1075
|
} else {
|
|
1065
1076
|
// if the checkboxes are checked previously, restore them
|
|
1066
1077
|
const isChecked = this.checkedRegions.find(item => item.label === regionName);
|
|
1067
1078
|
if (isChecked) {
|
|
1068
1079
|
region.showAllPrimitives();
|
|
1069
|
-
|
|
1070
|
-
const ids = zincObjects.map(object => object.region.uuid);
|
|
1071
|
-
idsList.push(...ids);
|
|
1080
|
+
idsList.push(region.uuid);
|
|
1072
1081
|
}
|
|
1073
1082
|
}
|
|
1074
1083
|
});
|
|
1075
|
-
|
|
1076
|
-
|
|
1084
|
+
if (nerves.length) {
|
|
1085
|
+
this.fitWindow();
|
|
1086
|
+
}
|
|
1087
|
+
this.$refs.scaffoldTreeControls.setCheckedKeys(idsList, processed);
|
|
1077
1088
|
}
|
|
1078
1089
|
},
|
|
1079
1090
|
enableAxisDisplay: function (enable, miniaxes) {
|
|
@@ -1120,7 +1131,7 @@ export default {
|
|
|
1120
1131
|
if (groupName in nervesMap) {
|
|
1121
1132
|
foundNerves++;
|
|
1122
1133
|
zincObject.setAnatomicalId(nervesMap[groupName]);
|
|
1123
|
-
console.log(groupName, zincObject.anatomicalId, zincObject.uuid)
|
|
1134
|
+
// console.log(groupName, zincObject.anatomicalId, zincObject.uuid)
|
|
1124
1135
|
}
|
|
1125
1136
|
} else {
|
|
1126
1137
|
zincObject.userData.isNerves = false;
|
|
@@ -2181,6 +2192,7 @@ export default {
|
|
|
2181
2192
|
if (this.$module) {
|
|
2182
2193
|
if (modeName) {
|
|
2183
2194
|
this.viewingMode = modeName;
|
|
2195
|
+
this.setIsPickable(true);
|
|
2184
2196
|
}
|
|
2185
2197
|
this.clearAnnotationFeature();
|
|
2186
2198
|
if (this.viewingMode === "Annotation") {
|
|
@@ -2197,12 +2209,12 @@ export default {
|
|
|
2197
2209
|
this.addAnnotationFeature();
|
|
2198
2210
|
this.loading = false;
|
|
2199
2211
|
});
|
|
2200
|
-
} else {
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2212
|
+
} else if (this.viewingMode === "Exploration") {
|
|
2213
|
+
this.activeDrawTool = undefined;
|
|
2214
|
+
this.activeDrawMode = undefined;
|
|
2215
|
+
this.createData.shape = "";
|
|
2216
|
+
} else if (this.viewingMode === "Neuron Connection") {
|
|
2217
|
+
this.setIsPickable(false);
|
|
2206
2218
|
}
|
|
2207
2219
|
if ((this.viewingMode === "Exploration") ||
|
|
2208
2220
|
(this.viewingMode === "Annotation") &&
|
|
@@ -2236,6 +2248,16 @@ export default {
|
|
|
2236
2248
|
this.tData.visible = false;
|
|
2237
2249
|
this.tData.region = undefined;
|
|
2238
2250
|
},
|
|
2251
|
+
/**
|
|
2252
|
+
* Currently will only apply to non-nerve object
|
|
2253
|
+
* @param flag boolean to control whether objects pickable
|
|
2254
|
+
*/
|
|
2255
|
+
setIsPickable: function (flag) {
|
|
2256
|
+
const objects = this.$module.scene.getRootRegion().getAllObjects(true);
|
|
2257
|
+
objects.forEach((zincObject) => {
|
|
2258
|
+
if (!zincObject.userData.isNerves) zincObject.setIsPickable(flag);
|
|
2259
|
+
});
|
|
2260
|
+
},
|
|
2239
2261
|
/**
|
|
2240
2262
|
*
|
|
2241
2263
|
* @param flag boolean
|
|
@@ -2501,7 +2523,7 @@ export default {
|
|
|
2501
2523
|
//this.$module.scene.createAxisDisplay(false);
|
|
2502
2524
|
//this.$module.scene.enableAxisDisplay(true, true);
|
|
2503
2525
|
this.isReady = true;
|
|
2504
|
-
console.log(`Total ${totalNerves}, found ${foundNerves}`);
|
|
2526
|
+
// console.log(`Total ${totalNerves}, found ${foundNerves}`);
|
|
2505
2527
|
this.$nextTick(() => {
|
|
2506
2528
|
this.restoreSettings(options);
|
|
2507
2529
|
this.$emit("on-ready");
|