@abi-software/scaffoldvuer 1.11.0 → 1.11.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/.eslintrc.js +6 -4
- package/dist/scaffoldvuer.js +40 -22
- package/dist/scaffoldvuer.umd.cjs +3 -3
- package/dist/style.css +1 -1
- package/package.json +6 -7
- package/src/components/ScaffoldVuer.vue +21 -7
- package/src/components/TransformationControls.vue +16 -1
- package/mapped_fma_nerves.json +0 -10914
- package/nerve_mapping.js +0 -10917
- package/vite.web-component.js +0 -36
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abi-software/scaffoldvuer",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
"*.js"
|
|
42
42
|
],
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@abi-software/map-utilities": "
|
|
44
|
+
"@abi-software/map-utilities": "1.7.0",
|
|
45
45
|
"@abi-software/sparc-annotation": "^0.3.2",
|
|
46
|
-
"@abi-software/svg-sprite": "
|
|
46
|
+
"@abi-software/svg-sprite": "21.0.2",
|
|
47
47
|
"@element-plus/icons-vue": "^2.3.1",
|
|
48
48
|
"core-js": "^3.22.5",
|
|
49
49
|
"element-plus": "2.8.4",
|
|
@@ -53,18 +53,17 @@
|
|
|
53
53
|
"unplugin-vue-components": "^0.26.0",
|
|
54
54
|
"vue": "^3.4.21",
|
|
55
55
|
"vue-router": "^4.2.5",
|
|
56
|
-
"
|
|
57
|
-
"zincjs": "^1.15.0"
|
|
56
|
+
"zincjs": "1.15.1"
|
|
58
57
|
},
|
|
59
58
|
"devDependencies": {
|
|
59
|
+
"@babel/eslint-parser": "^7.28.0",
|
|
60
60
|
"@vitejs/plugin-vue": "^4.6.2",
|
|
61
61
|
"@vuese/markdown-render": "^2.11.3",
|
|
62
62
|
"auto-changelog": "^2.4.0",
|
|
63
|
-
"babel-eslint": "^10.1.0",
|
|
64
63
|
"babel-plugin-component": "^1.1.1",
|
|
65
64
|
"chokidar": "^3.6.0",
|
|
66
65
|
"concurrently": "^8.2.2",
|
|
67
|
-
"eslint": "^
|
|
66
|
+
"eslint": "^9.34.0",
|
|
68
67
|
"eslint-plugin-vue": "^9.19.2",
|
|
69
68
|
"sass": "^1.69.5",
|
|
70
69
|
"vite": "^5.0.10",
|
|
@@ -463,7 +463,7 @@ import { getNerveMaps } from "../scripts/MappedNerves.js";
|
|
|
463
463
|
import { getOrganMaps } from '../scripts/MappedOrgans.js';
|
|
464
464
|
const nervesMap = getNerveMaps();
|
|
465
465
|
const organsMap = getOrganMaps();
|
|
466
|
-
let
|
|
466
|
+
let foundNerves = 0;
|
|
467
467
|
|
|
468
468
|
const haveSameElements = (arr1, arr2) => {
|
|
469
469
|
if (arr1.length !== arr2.length) return false;
|
|
@@ -689,8 +689,10 @@ export default {
|
|
|
689
689
|
*/
|
|
690
690
|
isNerves: {
|
|
691
691
|
type: Object,
|
|
692
|
-
default: {
|
|
693
|
-
|
|
692
|
+
default: function () {
|
|
693
|
+
return {
|
|
694
|
+
regions: ["nerves"]
|
|
695
|
+
};
|
|
694
696
|
},
|
|
695
697
|
},
|
|
696
698
|
/**
|
|
@@ -776,9 +778,11 @@ export default {
|
|
|
776
778
|
*/
|
|
777
779
|
usageConfig: {
|
|
778
780
|
type: Object,
|
|
779
|
-
default: {
|
|
780
|
-
|
|
781
|
-
|
|
781
|
+
default: function () {
|
|
782
|
+
return {
|
|
783
|
+
showTubeLinesControls: true,
|
|
784
|
+
tubeLines: false,
|
|
785
|
+
};
|
|
782
786
|
},
|
|
783
787
|
},
|
|
784
788
|
},
|
|
@@ -1125,6 +1129,16 @@ export default {
|
|
|
1125
1129
|
if (groupName in organsMap) {
|
|
1126
1130
|
zincObject.setAnatomicalId(organsMap[groupName]);
|
|
1127
1131
|
}
|
|
1132
|
+
const morph = zincObject.getGroup();
|
|
1133
|
+
if (morph && morph.position) {
|
|
1134
|
+
zincObject.userData.originalPos = [
|
|
1135
|
+
morph.position.x,
|
|
1136
|
+
morph.position.y,
|
|
1137
|
+
morph.position.z
|
|
1138
|
+
];
|
|
1139
|
+
} else {
|
|
1140
|
+
zincObject.userData.originalPos = [0, 0, 0];
|
|
1141
|
+
}
|
|
1128
1142
|
//Temporary way to mark an object as nerves
|
|
1129
1143
|
const regions = this.isNerves?.regions;
|
|
1130
1144
|
if (regions) {
|
|
@@ -2548,7 +2562,7 @@ export default {
|
|
|
2548
2562
|
//this.$module.scene.createAxisDisplay(false);
|
|
2549
2563
|
//this.$module.scene.enableAxisDisplay(true, true);
|
|
2550
2564
|
this.isReady = true;
|
|
2551
|
-
//console.log(`
|
|
2565
|
+
//console.log(`found ${foundNerves}`);
|
|
2552
2566
|
this.$nextTick(() => {
|
|
2553
2567
|
this.restoreSettings(options);
|
|
2554
2568
|
this.$emit("on-ready");
|
|
@@ -171,6 +171,7 @@ export default {
|
|
|
171
171
|
if (object.isZincObject) {
|
|
172
172
|
this.zincObject = markRaw(object);
|
|
173
173
|
const morph = this.zincObject.getGroup();
|
|
174
|
+
const originalPos = this.zincObject.userData.originalPos;
|
|
174
175
|
if (morph && morph.position) {
|
|
175
176
|
this.x = morph.position.x;
|
|
176
177
|
this.y = morph.position.y;
|
|
@@ -181,6 +182,18 @@ export default {
|
|
|
181
182
|
this.scale = morph.scale.x;
|
|
182
183
|
}
|
|
183
184
|
this.enableScaling = this.zincObject.isTextureSlides ? false : true;
|
|
185
|
+
if (originalPos && this.boundingDims) {
|
|
186
|
+
this.min = [
|
|
187
|
+
originalPos[0] - this.boundingDims.size[0],
|
|
188
|
+
originalPos[1] - this.boundingDims.size[1],
|
|
189
|
+
originalPos[2] - this.boundingDims.size[2]
|
|
190
|
+
];
|
|
191
|
+
this.max = [
|
|
192
|
+
originalPos[0] + this.boundingDims.size[0],
|
|
193
|
+
originalPos[1] + this.boundingDims.size[1],
|
|
194
|
+
originalPos[2] + this.boundingDims.size[2]
|
|
195
|
+
];
|
|
196
|
+
}
|
|
184
197
|
}
|
|
185
198
|
} else {
|
|
186
199
|
this.zincObject = undefined;
|
|
@@ -191,7 +204,9 @@ export default {
|
|
|
191
204
|
}
|
|
192
205
|
},
|
|
193
206
|
modifyPosition: function() {
|
|
194
|
-
this.zincObject
|
|
207
|
+
if (this.zincObject) {
|
|
208
|
+
this.zincObject.setPosition(this.x, this.y, this.z);
|
|
209
|
+
}
|
|
195
210
|
},
|
|
196
211
|
modifyScale: function() {
|
|
197
212
|
this.zincObject.setScaleAll(this.scale);
|