@abi-software/scaffoldvuer 1.3.0-beta.0 → 1.3.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abi-software/scaffoldvuer",
3
- "version": "1.3.0-beta.0",
3
+ "version": "1.3.1",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -41,7 +41,7 @@
41
41
  "*.js"
42
42
  ],
43
43
  "dependencies": {
44
- "@abi-software/map-utilities": "^0.0.0-beta.4",
44
+ "@abi-software/map-utilities": "^1.0.0",
45
45
  "@abi-software/sparc-annotation": "^0.3.1",
46
46
  "@abi-software/svg-sprite": "^1.0.0",
47
47
  "@element-plus/icons-vue": "^2.3.1",
@@ -55,7 +55,7 @@
55
55
  "vue": "^3.4.15",
56
56
  "vue-router": "^4.2.5",
57
57
  "vue3-component-svg-sprite": "^0.0.1",
58
- "zincjs": "^1.8.5"
58
+ "zincjs": "^1.10.0"
59
59
  },
60
60
  "devDependencies": {
61
61
  "@vitejs/plugin-vue": "^4.6.2",
package/src/App.vue CHANGED
@@ -27,11 +27,12 @@
27
27
  :view-u-r-l="viewURL"
28
28
  :format="format"
29
29
  :marker-labels="markerLabels"
30
- :enableLocalAnnotations="true"
30
+ :enableLocalAnnotations="false"
31
31
  @open-map="openMap"
32
32
  @on-ready="onReady"
33
33
  @scaffold-selected="onSelected"
34
34
  @scaffold-navigated="onNavigated"
35
+ @user-primitives-updated="userPrimitivesUpdated"
35
36
  @timeChanged="updateCurrentTime"
36
37
  @zinc-object-added="objectAdded"
37
38
  @vue:mounted="viewerMounted"
@@ -358,7 +359,7 @@ export default {
358
359
  data: function () {
359
360
  return {
360
361
  consoleOn: true,
361
- createLinesWithNormal: true,
362
+ createLinesWithNormal: false,
362
363
  url: undefined,
363
364
  input: undefined,
364
365
  displayUI: true,
@@ -572,6 +573,9 @@ export default {
572
573
  viewModelClicked: function (location) {
573
574
  this.input = location;
574
575
  },
576
+ userPrimitivesUpdated: function (event) {
577
+ console.log(event);
578
+ },
575
579
  screenCapture: function () {
576
580
  this.$refs.scaffold.captureScreenshot("capture.png");
577
581
  },
@@ -671,6 +675,7 @@ export default {
671
675
  //this.$refs.scaffold.showRegionTooltipWithAnnotations(data, false, true);
672
676
  if (this.onClickMarkers) this.$refs.scaffold.setMarkerModeForObjectsWithName(data[0].data.group, "on");
673
677
  }
678
+ if (this.consoleOn) console.log(data);
674
679
  },
675
680
 
676
681
  onNavigated: function (data) {
@@ -28,24 +28,26 @@
28
28
  </el-col>
29
29
  </el-row>
30
30
  <template v-if="currentIndex > -1 && distance > 0">
31
- <el-col :offset="0" :span="4">
32
- <el-button
33
- size='small'
34
- :disabled="currentIndex === 0"
35
- :icon="ElIconArrowLeft"
36
- @click="changeIndex(false)"
37
- />
38
- </el-col>
39
- <el-col :offset="4" :span="9">
40
- Editing Line {{ currentIndex + 1}}
41
- </el-col>
42
- <el-col :offset="2" :span="2">
43
- <el-button
44
- size='small'
45
- :icon="ElIconArrowRight"
46
- @click="changeIndex(true)"
47
- />
48
- </el-col>
31
+ <el-row>
32
+ <el-col :offset="0" :span="4">
33
+ <el-button
34
+ size='small'
35
+ :disabled="currentIndex === 0"
36
+ :icon="ElIconArrowLeft"
37
+ @click="changeIndex(false)"
38
+ />
39
+ </el-col>
40
+ <el-col :offset="4" :span="9">
41
+ Editing Line {{ currentIndex + 1}}
42
+ </el-col>
43
+ <el-col :offset="2" :span="2">
44
+ <el-button
45
+ size='small'
46
+ :icon="ElIconArrowRight"
47
+ @click="changeIndex(true)"
48
+ />
49
+ </el-col>
50
+ </el-row>
49
51
  <el-row>
50
52
  <el-col :offset="0" :span="6">
51
53
  Move:
@@ -137,6 +139,7 @@ export default {
137
139
  adjust: 0,
138
140
  pAdjust: 0,
139
141
  lengthScale: 0,
142
+ distance: 0,
140
143
  newDistance: 0,
141
144
  width: 1,
142
145
  currentIndex: 0,
@@ -134,6 +134,7 @@ import {
134
134
  ElContainer as Container,
135
135
  ElInputNumber as InputNumber,
136
136
  ElMain as Main,
137
+ ElRow as Row,
137
138
  ElSelect as Select,
138
139
  ElSlider as Slider,
139
140
  ElOption as Option,
@@ -155,6 +156,7 @@ export default {
155
156
  Main,
156
157
  Select,
157
158
  Slider,
159
+ Row,
158
160
  Option,
159
161
  ElIconArrowLeft,
160
162
  ElIconArrowRight,
@@ -1057,7 +1057,7 @@ export default {
1057
1057
  * Add and edit local annotations
1058
1058
  */
1059
1059
  addAndEditAnnotations: function (region, group, zincObject, comment) {
1060
- const annotation =addUserAnnotationWithFeature(this.annotator, this.userToken, zincObject,
1060
+ const annotation = addUserAnnotationWithFeature(this.annotator, this.userToken, zincObject,
1061
1061
  region, group, this.url, comment);
1062
1062
  if (this.enableLocalAnnotations) {
1063
1063
  annotation.group = group;
@@ -1070,6 +1070,7 @@ export default {
1070
1070
  this.removeFromLocalAnnotationList(regionPath, group);
1071
1071
  this.localAnnotationsList.push(annotation);
1072
1072
  }
1073
+ this.$emit('userPrimitivesUpdated', {region, group, zincObject});
1073
1074
  },
1074
1075
  /**
1075
1076
  * @vuese
@@ -1082,7 +1083,6 @@ export default {
1082
1083
  const region = object.region.getFullPath();
1083
1084
  this.addAndEditAnnotations(region, group, object, "Position Updated");
1084
1085
  }
1085
-
1086
1086
  },
1087
1087
  /**
1088
1088
  * @vuese
@@ -245,7 +245,8 @@ const OrgansSceneData = function() {
245
245
  intersected ? intersected.point.y : 0,
246
246
  intersected ? intersected.point.z : 0,
247
247
  ],
248
- intersected,
248
+ intersected: intersected,
249
+ intersects: intersects,
249
250
  };
250
251
  const coords = { x: window_x, y: window_y };
251
252
  if (idObject.id) {
@@ -37,6 +37,7 @@ const RendererModule = function() {
37
37
  this.selectedScreenCoordinates = new THREE.Vector3();
38
38
  this.selectedCenter = undefined;
39
39
  this.liveUpdatesObjects = undefined;
40
+ this.ignorePreviousSelected = false;
40
41
  }
41
42
 
42
43
  RendererModule.prototype = Object.create(BaseModule.prototype);
@@ -88,6 +89,9 @@ RendererModule.prototype.getAnnotationsFromObjects = function(objects) {
88
89
  annotation.data.id = objects[i].name;
89
90
  }
90
91
  }
92
+ if (annotation) {
93
+ annotation.data.zincObject = zincObject;
94
+ }
91
95
  }
92
96
  if (annotation)
93
97
  annotations.push(annotation);
@@ -174,7 +178,7 @@ RendererModule.prototype.setSelectedByObjects = function(
174
178
  } else {
175
179
  changed = true;
176
180
  }
177
- if (changed) {
181
+ if (changed || this.ignorePreviousSelected) {
178
182
  const zincObjects = this.objectsToZincObjects(objects);
179
183
  if (this.selectObjectOnPick) {
180
184
  this.setupLiveCoordinates(zincObjects);