@abi-software/scaffoldvuer 1.15.1 → 1.15.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abi-software/scaffoldvuer",
3
- "version": "1.15.1",
3
+ "version": "1.15.2",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -53,7 +53,7 @@
53
53
  "unplugin-vue-components": "^0.26.0",
54
54
  "vue": "^3.4.21",
55
55
  "vue-router": "^4.2.5",
56
- "zincjs": "1.18.5"
56
+ "zincjs": "1.18.7"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@babel/eslint-parser": "^7.28.0",
@@ -238,7 +238,7 @@ const OrgansSceneData = function() {
238
238
  id = intersectedObject.name;
239
239
  } else {
240
240
  const annotations = _this.getAnnotationsFromObjects(
241
- [intersectedObject]);
241
+ [intersectedObject], undefined);
242
242
  if (annotations && annotations[0]) {
243
243
  id = annotations[0].data.group;
244
244
  }
@@ -267,6 +267,7 @@ const OrgansSceneData = function() {
267
267
  ],
268
268
  intersected: intersected,
269
269
  intersects: intersects,
270
+ instanceId: intersected?.instanceId ? intersected.instanceId : -1,
270
271
  };
271
272
  const coords = { x: window_x, y: window_y };
272
273
  if (idObject.id) {
@@ -305,6 +306,7 @@ const OrgansSceneData = function() {
305
306
  intersected ? intersected.point.y : 0,
306
307
  intersected ? intersected.point.z : 0,
307
308
  ],
309
+ instanceId: intersected?.instanceId ? intersected.instanceId : -1,
308
310
  }
309
311
  const coords = { x: window_x, y: window_y };
310
312
  if (idObject.id) {
@@ -50,7 +50,7 @@ RendererModule.prototype.getIntersectedObject = function(intersects) {
50
50
  intersect.object.userData) {
51
51
  if (intersect.object.userData.isMarker) {
52
52
  return 1;
53
- } else if (intersect.object.name &&
53
+ } else if (intersect.object.name &&
54
54
  intersect.object.userData.isZincObject) {
55
55
  if (intersect.object.name === "_Unnamed") {
56
56
  return 3;
@@ -75,7 +75,7 @@ RendererModule.prototype.getIntersectedObject = function(intersects) {
75
75
  }
76
76
 
77
77
 
78
- RendererModule.prototype.getAnnotationsFromObjects = function(objects) {
78
+ RendererModule.prototype.getAnnotationsFromObjects = function(objects, extraData) {
79
79
  const annotations = [];
80
80
  for (var i = 0; i < objects.length; i++) {
81
81
  const zincObject = objects[i].userData;
@@ -88,10 +88,13 @@ RendererModule.prototype.getAnnotationsFromObjects = function(objects) {
88
88
  }
89
89
  annotation = glyphset.userData ? glyphset.userData.annotation : undefined;
90
90
  if (annotation && annotation.data) {
91
- if (objects[i].name && objects[i].name != "")
91
+ if (extraData && 'instanceId' in extraData) {
92
+ annotation.data.id = glyphset.getLabel(extraData.instanceId);
93
+ } else if (objects[i].name && objects[i].name != "") {
92
94
  annotation.data.id = objects[i].name;
93
- else
95
+ } else {
94
96
  annotation.data.id = glyphset.groupName;
97
+ }
95
98
  }
96
99
  } else {
97
100
  annotation = zincObject.userData ? zincObject.userData.annotation : undefined;
@@ -119,7 +122,7 @@ RendererModule.prototype.setHighlightedByObjects = function(
119
122
  let eventType = EVENT_TYPE.MOVE;
120
123
  if (changed)
121
124
  eventType = EVENT_TYPE.HIGHLIGHTED;
122
- const annotations = this.getAnnotationsFromObjects(objects);
125
+ const annotations = this.getAnnotationsFromObjects(objects, extraData);
123
126
  if (annotations.length > 0) {
124
127
  annotations[0].coords = coords;
125
128
  annotations[0].extraData = extraData;
@@ -179,7 +182,7 @@ RendererModule.prototype.setSelectedByObjects = function(
179
182
  }
180
183
  if (propagateChanges) {
181
184
  const eventType = EVENT_TYPE.SELECTED;
182
- const annotations = this.getAnnotationsFromObjects(objects);
185
+ const annotations = this.getAnnotationsFromObjects(objects, extraData);
183
186
  if (annotations.length > 0) {
184
187
  annotations[0].coords = coords;
185
188
  annotations[0].extraData = extraData;
@@ -239,7 +242,7 @@ RendererModule.prototype.resetView = function() {
239
242
  if (this.zincRenderer)
240
243
  this.zincRenderer.resetView();
241
244
  }
242
-
245
+
243
246
  RendererModule.prototype.viewAll = function() {
244
247
  if (this.zincRenderer)
245
248
  this.zincRenderer.viewAll();
@@ -271,10 +274,10 @@ RendererModule.prototype.getPlayRate = function(value) {
271
274
  else
272
275
  return 0.0;
273
276
  }
274
-
277
+
275
278
  /** Initialise everything in the renderer, including the 3D renderer,
276
279
  * and picker for the 3D renderer.
277
- *
280
+ *
278
281
  */
279
282
  RendererModule.prototype.initialiseRenderer = function(displayAreaIn) {
280
283
  if (this.zincRenderer === undefined || this.rendererContainer === undefined) {