@abi-software/scaffoldvuer 0.1.56 → 0.1.57

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-lock.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abi-software/scaffoldvuer",
3
- "version": "0.1.55",
3
+ "version": "0.1.57",
4
4
  "lockfileVersion": 1,
5
5
  "requires": true,
6
6
  "dependencies": {
@@ -74,9 +74,9 @@
74
74
  },
75
75
  "dependencies": {
76
76
  "json5": {
77
- "version": "2.2.1",
78
- "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz",
79
- "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==",
77
+ "version": "2.2.3",
78
+ "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
79
+ "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
80
80
  "dev": true
81
81
  }
82
82
  }
@@ -1635,9 +1635,9 @@
1635
1635
  "dev": true
1636
1636
  },
1637
1637
  "@types/node": {
1638
- "version": "18.11.9",
1639
- "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.9.tgz",
1640
- "integrity": "sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg==",
1638
+ "version": "18.11.11",
1639
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.11.tgz",
1640
+ "integrity": "sha512-KJ021B1nlQUBLopzZmPBVuGU9un7WJd/W4ya7Ih02B4Uwky5Nja0yGYav2EfYIk0RR2Q9oVhf60S2XR1BCWJ2g==",
1641
1641
  "dev": true
1642
1642
  },
1643
1643
  "@types/normalize-package-data": {
@@ -2952,9 +2952,9 @@
2952
2952
  },
2953
2953
  "dependencies": {
2954
2954
  "json5": {
2955
- "version": "2.2.1",
2956
- "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz",
2957
- "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==",
2955
+ "version": "2.2.3",
2956
+ "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
2957
+ "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
2958
2958
  "dev": true
2959
2959
  },
2960
2960
  "loader-utils": {
@@ -3204,9 +3204,9 @@
3204
3204
  "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ=="
3205
3205
  },
3206
3206
  "bignumber.js": {
3207
- "version": "9.1.0",
3208
- "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.0.tgz",
3209
- "integrity": "sha512-4LwHK4nfDOraBCtst+wOWIHbu1vhvAPJK8g8nROd4iuc3PSEjWif/qwbkh8jwCJz6yDBvtU4KPynETgrfh7y3A=="
3207
+ "version": "9.1.1",
3208
+ "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.1.tgz",
3209
+ "integrity": "sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig=="
3210
3210
  },
3211
3211
  "binary-extensions": {
3212
3212
  "version": "2.2.0",
@@ -3819,9 +3819,9 @@
3819
3819
  }
3820
3820
  },
3821
3821
  "caniuse-lite": {
3822
- "version": "1.0.30001434",
3823
- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001434.tgz",
3824
- "integrity": "sha512-aOBHrLmTQw//WFa2rcF1If9fa3ypkC1wzqqiKHgfdrXTWcU8C4gKVZT77eQAPWN1APys3+uQ0Df07rKauXGEYA==",
3822
+ "version": "1.0.30001436",
3823
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001436.tgz",
3824
+ "integrity": "sha512-ZmWkKsnC2ifEPoWUvSAIGyOYwT+keAaaWPHiQ9DfMqS1t6tfuyFYoWR78TeZtznkEQ64+vGXH9cZrElwR2Mrxg==",
3825
3825
  "dev": true
3826
3826
  },
3827
3827
  "case-sensitive-paths-webpack-plugin": {
@@ -5132,9 +5132,9 @@
5132
5132
  "dev": true
5133
5133
  },
5134
5134
  "decode-uri-component": {
5135
- "version": "0.2.0",
5136
- "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz",
5137
- "integrity": "sha512-hjf+xovcEn31w/EUYdTXQh/8smFL/dzYjohQGEIgjyNavaJfBY2p5F527Bo1VPATxv0VYTUC2bOcXvqFwk78Og=="
5135
+ "version": "0.2.2",
5136
+ "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz",
5137
+ "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ=="
5138
5138
  },
5139
5139
  "deep-equal": {
5140
5140
  "version": "1.1.1",
@@ -6519,9 +6519,9 @@
6519
6519
  "dev": true
6520
6520
  },
6521
6521
  "fastq": {
6522
- "version": "1.13.0",
6523
- "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz",
6524
- "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==",
6522
+ "version": "1.14.0",
6523
+ "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.14.0.tgz",
6524
+ "integrity": "sha512-eR2D+V9/ExcbF9ls441yIuN6TI2ED1Y2ZcA5BmMtJsOkWOFRJQ0Jt0g1UwqXJJVAb+V+umH5Dfr8oh4EVP7VVg==",
6525
6525
  "dev": true,
6526
6526
  "requires": {
6527
6527
  "reusify": "^1.0.4"
@@ -13037,9 +13037,9 @@
13037
13037
  "dev": true
13038
13038
  },
13039
13039
  "json5": {
13040
- "version": "2.2.1",
13041
- "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz",
13042
- "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==",
13040
+ "version": "2.2.3",
13041
+ "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
13042
+ "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
13043
13043
  "dev": true
13044
13044
  },
13045
13045
  "kleur": {
@@ -13275,9 +13275,9 @@
13275
13275
  }
13276
13276
  },
13277
13277
  "terser": {
13278
- "version": "5.16.0",
13279
- "resolved": "https://registry.npmjs.org/terser/-/terser-5.16.0.tgz",
13280
- "integrity": "sha512-KjTV81QKStSfwbNiwlBXfcgMcOloyuRdb62/iLFPGBcVNF4EXjhdYBhYHmbJpiBrVxZhDvltE11j+LBQUxEEJg==",
13278
+ "version": "5.16.1",
13279
+ "resolved": "https://registry.npmjs.org/terser/-/terser-5.16.1.tgz",
13280
+ "integrity": "sha512-xvQfyfA1ayT0qdK47zskQgRZeWLoOQ8JQ6mIgRGVNwZKdQMU+5FkCBjmv4QjcrTzyZquRw2FVtlJSRUmMKQslw==",
13281
13281
  "dev": true,
13282
13282
  "requires": {
13283
13283
  "@jridgewell/source-map": "^0.3.2",
@@ -15044,9 +15044,9 @@
15044
15044
  },
15045
15045
  "dependencies": {
15046
15046
  "json5": {
15047
- "version": "2.2.1",
15048
- "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz",
15049
- "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==",
15047
+ "version": "2.2.3",
15048
+ "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
15049
+ "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
15050
15050
  "dev": true
15051
15051
  },
15052
15052
  "loader-utils": {
@@ -16141,9 +16141,9 @@
16141
16141
  "integrity": "sha512-ePuy1EDDJd9/piwXLwsCyMQ964HsdhXPzypM9OX0r4JBa20EVN28U7RXeTWwXkoFKim/b3sP7xT2NEM0Di6tUQ=="
16142
16142
  },
16143
16143
  "vue-docgen-api": {
16144
- "version": "4.54.2",
16145
- "resolved": "https://registry.npmjs.org/vue-docgen-api/-/vue-docgen-api-4.54.2.tgz",
16146
- "integrity": "sha512-KWFjSfoD/mJ8wQX1vvj0IvJCyRFGo+Fymy3J5qzOeYLIQfknkZ7ssZX4cqH25ks4TD0OIBrZI4D5ZiyKlMK2YQ==",
16144
+ "version": "4.56.0",
16145
+ "resolved": "https://registry.npmjs.org/vue-docgen-api/-/vue-docgen-api-4.56.0.tgz",
16146
+ "integrity": "sha512-ab/Scb0DCjm4YVLf+AFa/R7XMFl8TVwUsvh26fFT5iaURih1m2hdd5Y8NveA7NQDcycpWavkFZj9eVbQdp2VGQ==",
16147
16147
  "dev": true,
16148
16148
  "requires": {
16149
16149
  "@babel/parser": "^7.13.12",
@@ -16788,9 +16788,9 @@
16788
16788
  }
16789
16789
  },
16790
16790
  "terser": {
16791
- "version": "5.16.0",
16792
- "resolved": "https://registry.npmjs.org/terser/-/terser-5.16.0.tgz",
16793
- "integrity": "sha512-KjTV81QKStSfwbNiwlBXfcgMcOloyuRdb62/iLFPGBcVNF4EXjhdYBhYHmbJpiBrVxZhDvltE11j+LBQUxEEJg==",
16791
+ "version": "5.16.1",
16792
+ "resolved": "https://registry.npmjs.org/terser/-/terser-5.16.1.tgz",
16793
+ "integrity": "sha512-xvQfyfA1ayT0qdK47zskQgRZeWLoOQ8JQ6mIgRGVNwZKdQMU+5FkCBjmv4QjcrTzyZquRw2FVtlJSRUmMKQslw==",
16794
16794
  "dev": true,
16795
16795
  "requires": {
16796
16796
  "@jridgewell/source-map": "^0.3.2",
@@ -17813,9 +17813,9 @@
17813
17813
  }
17814
17814
  },
17815
17815
  "zincjs": {
17816
- "version": "1.0.9",
17817
- "resolved": "https://registry.npmjs.org/zincjs/-/zincjs-1.0.9.tgz",
17818
- "integrity": "sha512-N8Jexto6vmLVu4X8UX1Xes+BbPOxYmrutI4vNXsKspoGNY2Rq2Ffys5GnVV9ZBYWq/Jfm/cvznPlaBBWk3jXdw==",
17816
+ "version": "1.0.11",
17817
+ "resolved": "https://registry.npmjs.org/zincjs/-/zincjs-1.0.11.tgz",
17818
+ "integrity": "sha512-SknkseprKt2kxnsniohhkPQ56WT+9b7Ju1kxynhs83yNE2lcuakphedTRIBHGUUNcRAzw8TCgtfjN52uKFtKzQ==",
17819
17819
  "requires": {
17820
17820
  "css-element-queries": "^1.2.2",
17821
17821
  "lodash": "^4.17.19",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abi-software/scaffoldvuer",
3
- "version": "0.1.56",
3
+ "version": "0.1.57",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -36,7 +36,7 @@
36
36
  "vue-custom-element": "^3.3.0",
37
37
  "vue-drag-resize": "^1.3.2",
38
38
  "vue-router": "^3.5.1",
39
- "zincjs": "^1.0.9"
39
+ "zincjs": "^1.0.11"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@vue/cli-plugin-babel": "^4.0.0",
package/src/App.vue CHANGED
@@ -374,9 +374,10 @@ export default {
374
374
  },
375
375
  onReady: function() {
376
376
  console.log("ready")
377
+ //window.scaffoldvuer = this.$refs.scaffold;
377
378
  this.$refs.dropzone.revokeURLs();
378
- //const names = ["left ventricle.mesh2d", "right ventricle.mesh2d"];
379
- //this.$refs.scaffold.changeActiveByName(names, "", false);
379
+ const names = ["left ventricle.mesh2d", "right ventricle.mesh2d"];
380
+ this.$refs.scaffold.changeActiveByName(names, "", false);
380
381
  },
381
382
  onSelected: function(data) {
382
383
  if (data && (data.length > 0) && data[0].data.group) {
@@ -59,7 +59,12 @@ export default {
59
59
  },
60
60
  computed: {
61
61
  position: function () {
62
- return { left: this.x + "px", top: this.y - 30 + "px" };
62
+ let yOffset = 30;
63
+ if (this.region) {
64
+ yOffset = 45;
65
+ }
66
+
67
+ return { left: this.x + "px", top: this.y - yOffset + "px" };
63
68
  },
64
69
  },
65
70
  watch: {
@@ -37,8 +37,8 @@
37
37
  v-if="displayWarning"
38
38
  v-popover:warningPopover
39
39
  class="el-icon-warning warning-icon"
40
- @mouseover="showToolitip(6)"
41
- @mouseout="hideToolitip(6)"
40
+ @mouseover="showHelpText(6)"
41
+ @mouseout="hideHelpText(6)"
42
42
  >
43
43
  <span class="warning-text">Beta</span>
44
44
  </i>
@@ -52,10 +52,9 @@
52
52
  popper-class="scaffold-popper right-popper non-selectable"
53
53
  />
54
54
  <tree-controls
55
- ref="treeControl"
55
+ ref="treeControls"
56
56
  v-popover:checkBoxPopover
57
57
  :help-mode="helpMode"
58
- :module="$module"
59
58
  :show-colour-picker="showColourPicker"
60
59
  @object-selected="objectSelected"
61
60
  @object-hovered="objectHovered"
@@ -158,8 +157,8 @@
158
157
  icon="zoomIn"
159
158
  class="icon-button zoomIn"
160
159
  @click.native="zoomIn()"
161
- @mouseover.native="showToolitip(0)"
162
- @mouseout.native="hideToolitip(0)"
160
+ @mouseover.native="showHelpText(0)"
161
+ @mouseout.native="hideHelpText(0)"
163
162
  />
164
163
  </el-popover>
165
164
  <el-popover
@@ -175,8 +174,8 @@
175
174
  icon="zoomOut"
176
175
  class="icon-button zoomOut"
177
176
  @click.native="zoomOut()"
178
- @mouseover.native="showToolitip(1)"
179
- @mouseout.native="hideToolitip(1)"
177
+ @mouseover.native="showHelpText(1)"
178
+ @mouseout.native="hideHelpText(1)"
180
179
  />
181
180
  </el-popover>
182
181
  <el-popover
@@ -196,8 +195,8 @@
196
195
  icon="fitWindow"
197
196
  class="icon-button fitWindow"
198
197
  @click.native="fitWindow()"
199
- @mouseover.native="showToolitip(2)"
200
- @mouseout.native="hideToolitip(2)"
198
+ @mouseover.native="showHelpText(2)"
199
+ @mouseout.native="hideHelpText(2)"
201
200
  />
202
201
  </el-popover>
203
202
  </div>
@@ -235,8 +234,8 @@
235
234
  icon="changeBckgd"
236
235
  class="icon-button background-colour"
237
236
  :class="{ open: drawerOpen, close: !drawerOpen }"
238
- @mouseover.native="showToolitip(3)"
239
- @mouseout.native="hideToolitip(3)"
237
+ @mouseover.native="showHelpText(3)"
238
+ @mouseout.native="hideHelpText(3)"
240
239
  />
241
240
  </el-popover>
242
241
  </div>
@@ -481,7 +480,8 @@ export default {
481
480
  region: "",
482
481
  visible: false,
483
482
  x: 200,
484
- y: 200
483
+ y: 200,
484
+ external: false,
485
485
  },
486
486
  fileFormat: "metadata",
487
487
  };
@@ -560,6 +560,7 @@ export default {
560
560
  this.availableBackground = ["white", "black", "lightskyblue"];
561
561
  },
562
562
  mounted: function() {
563
+ this.$refs.treeControls.setModule(this.$module);
563
564
  let eventNotifier = new EventNotifier();
564
565
  eventNotifier.subscribe(this, this.eventNotifierCallback);
565
566
  this.$module.addNotifier(eventNotifier);
@@ -703,7 +704,7 @@ export default {
703
704
  viewRegion: function(names) {
704
705
  const rootRegion = this.$module.scene.getRootRegion();
705
706
  const groups = Array.isArray(names) ? names : [names];
706
- const objects = findObjectsWithNames(rootRegion, groups, "");
707
+ const objects = findObjectsWithNames(rootRegion, groups, "", true);
707
708
  let box = this.$module.scene.getBoundingBoxOfZincObjects(objects);
708
709
  if (box) {
709
710
  if (this.$module.isSyncControl()) {
@@ -765,6 +766,7 @@ export default {
765
766
  /**
766
767
  * Callback when a region is selected/highlighted.
767
768
  * It will also update other controls.
769
+ *
768
770
  */
769
771
  eventNotifierCallback: function(event) {
770
772
  const names = [];
@@ -781,13 +783,18 @@ export default {
781
783
  });
782
784
  zincObjects = event.zincObjects;
783
785
  }
786
+ /*
787
+ * Event Type 1: Selected
788
+ * Event Type 2: Highlighted
789
+ * Event Type 1: Move
790
+ */
784
791
  if (event.eventType == 1) {
785
- if (this.$refs.treeControl) {
792
+ if (this.$refs.treeControls) {
786
793
  if (names.length > 0) {
787
- //this.$refs.treeControl.changeActiveByNames(names, region, false);
788
- this.$refs.treeControl.updateActiveUI(zincObjects);
794
+ //this.$refs.treeControls.changeActiveByNames(names, region, false);
795
+ this.$refs.treeControls.updateActiveUI(zincObjects);
789
796
  } else {
790
- this.$refs.treeControl.removeActive(true)
797
+ this.$refs.treeControls.removeActive(true)
791
798
  }
792
799
  }
793
800
  // Triggers when an object has been selected
@@ -795,12 +802,12 @@ export default {
795
802
  } else if (event.eventType == 2) {
796
803
  this.tData.visible = false;
797
804
  // const offsets = this.$refs.scaffoldContainer.getBoundingClientRect();
798
- if (this.$refs.treeControl) {
805
+ if (this.$refs.treeControls) {
799
806
  if (names.length > 0) {
800
- //this.$refs.treeControl.changeHoverByNames(names, region, false);
801
- this.$refs.treeControl.updateHoverUI(zincObjects);
807
+ //this.$refs.treeControls.changeHoverByNames(names, region, false);
808
+ this.$refs.treeControls.updateHoverUI(zincObjects);
802
809
  } else {
803
- this.$refs.treeControl.removeHover(true);
810
+ this.$refs.treeControls.removeHover(true);
804
811
  }
805
812
  }
806
813
  if ((event.identifiers.length > 0) && event.identifiers[0]) {
@@ -808,6 +815,7 @@ export default {
808
815
  ? event.identifiers[0].data.id
809
816
  : event.identifiers[0].data.group;
810
817
  if (event.identifiers[0].coords) {
818
+ this.tData.external = false;
811
819
  this.tData.visible = true;
812
820
  this.tData.label = id;
813
821
  if (event.identifiers[0].data.region)
@@ -889,12 +897,12 @@ export default {
889
897
  changeActiveByName: function(names, region, propagate) {
890
898
  const isArray = Array.isArray(names);
891
899
  if (names === undefined || (isArray && names.length === 0)) {
892
- this.$refs.treeControl.removeActive(propagate);
900
+ this.$refs.treeControls.removeActive(propagate);
893
901
  } else {
894
902
  let array = names;
895
903
  if (!isArray)
896
904
  array = [array];
897
- this.$refs.treeControl.changeActiveByNames(array, region, propagate);
905
+ this.$refs.treeControls.changeActiveByNames(array, region, propagate);
898
906
  }
899
907
  },
900
908
  /**
@@ -905,12 +913,12 @@ export default {
905
913
  changeHighlightedByName: function(names, region, propagate) {
906
914
  const isArray = Array.isArray(names);
907
915
  if (names === undefined || (isArray && names.length === 0)) {
908
- this.$refs.treeControl.removeHover(propagate);
916
+ this.$refs.treeControls.removeHover(propagate);
909
917
  } else {
910
918
  let array = names;
911
919
  if (!isArray)
912
920
  array = [array];
913
- this.$refs.treeControl.changeHoverByNames(array, region, propagate);
921
+ this.$refs.treeControls.changeHoverByNames(array, region, propagate);
914
922
  }
915
923
  },
916
924
  /**
@@ -938,24 +946,82 @@ export default {
938
946
  });
939
947
  }
940
948
  },
949
+ /**
950
+ * Callback function used by showRegionTooltip in the case when the tooltip
951
+ * is out of view.
952
+ */
953
+ showRegionTooltipCallback: function(name) {
954
+ const instance = this;
955
+ return function() {
956
+ instance.$module.zincRenderer.removePostRenderCallbackFunction(instance.$_regionTooltipCallback);
957
+ instance.showRegionTooltip(name, false);
958
+ }
959
+ },
960
+ /**
961
+ * Display the tooltip. Reset view if the tooltip is not
962
+ * in view.
963
+ */
964
+ showRegionTooltip: function(name, resetView) {
965
+ if (name && this.$module.scene) {
966
+ const rootRegion = this.$module.scene.getRootRegion();
967
+ const groups = [name];
968
+ const objects = findObjectsWithNames(rootRegion, groups, "", true);
969
+ if (objects.length > 0) {
970
+ let coords = objects[0].getClosestVertexDOMElementCoords(this.$module.scene);
971
+ if (coords) {
972
+ //The coords is not in view, view all if resetView flag is true
973
+ if (!coords.inView) {
974
+ this.hideRegionTooltip();
975
+ if (resetView) {
976
+ this.$module.scene.viewAll();
977
+ //Use the post render callback to make sure the scene has been updated
978
+ //before getting the position of the tooltip.
979
+ this.$_regionTooltipCallback =
980
+ this.$module.zincRenderer.addPostRenderCallbackFunction(
981
+ this.showRegionTooltipCallback(name)
982
+ );
983
+ }
984
+ return;
985
+ } else {
986
+ this.tData.external = true;
987
+ this.tData.visible = true;
988
+ this.tData.label = name;
989
+ this.tData.x = coords.position.x;
990
+ this.tData.y = coords.position.y;
991
+ const regionPath = objects[0].getRegion().getFullPath();
992
+ if (regionPath)
993
+ this.tData.region = regionPath;
994
+ else
995
+ this.tData.region = "Root";
996
+ }
997
+ }
998
+ } else {
999
+ this.hideRegionTooltip();
1000
+ }
1001
+ }
1002
+ },
1003
+ hideRegionTooltip: function() {
1004
+ this.tData.visible = false;
1005
+ this.tData.region = "Root";
1006
+ },
941
1007
  /**
942
1008
  * This is called when mouse cursor enters supported elements
943
1009
  * with help tootltips.
944
1010
  */
945
- showToolitip: function(tooltipNumber) {
1011
+ showHelpText: function(helpTextNumber) {
946
1012
  if (!this.inHelp) {
947
- this.tooltipWait = setTimeout(() => {
948
- this.hoverVisabilities[tooltipNumber].value = true;
1013
+ this.helpTextWait = setTimeout(() => {
1014
+ this.hoverVisabilities[helpTextNumber].value = true;
949
1015
  }, 500);
950
1016
  }
951
1017
  },
952
1018
  /**
953
1019
  * This is called when mouse cursor exits supported element..
954
1020
  */
955
- hideToolitip: function(tooltipNumber) {
1021
+ hideHelpText: function(helpTextNumber) {
956
1022
  if (!this.inHelp) {
957
- this.hoverVisabilities[tooltipNumber].value = false;
958
- clearTimeout(this.tooltipWait);
1023
+ this.hoverVisabilities[helpTextNumber].value = false;
1024
+ clearTimeout(this.helpTextWait);
959
1025
  }
960
1026
  },
961
1027
  /**
@@ -998,7 +1064,7 @@ export default {
998
1064
  if (options.visibility) {
999
1065
  // Some UIs may not be ready at this time.
1000
1066
  this.$nextTick(() => {
1001
- this.$refs.treeControl.setState(options.visibility);
1067
+ this.$refs.treeControls.setState(options.visibility);
1002
1068
  });
1003
1069
  }
1004
1070
  }
@@ -1023,8 +1089,8 @@ export default {
1023
1089
  viewport: undefined,
1024
1090
  visibility: undefined,
1025
1091
  };
1026
- if (this.$refs.treeControl)
1027
- state.visibility = this.$refs.treeControl.getState();
1092
+ if (this.$refs.treeControls)
1093
+ state.visibility = this.$refs.treeControls.getState();
1028
1094
  if (this.$module.scene) {
1029
1095
  let zincCameraControls = this.$module.scene.getZincCameraControls();
1030
1096
  state.viewport = zincCameraControls.getCurrentViewport();
@@ -1053,7 +1119,7 @@ export default {
1053
1119
  .getZincCameraControls()
1054
1120
  .setCurrentCameraSettings(state.viewport);
1055
1121
  if (state.visibility)
1056
- this.$refs.treeControl.setState(state.visibility);
1122
+ this.$refs.treeControls.setState(state.visibility);
1057
1123
  } else {
1058
1124
  this.$module.setFinishDownloadCallback(
1059
1125
  this.setURLFinishCallback({
@@ -1083,8 +1149,8 @@ export default {
1083
1149
  let visibility =
1084
1150
  state && state.visibility ? state.visibility : undefined;
1085
1151
  this._currentURL = newValue;
1086
- if (this.$refs.treeControl)
1087
- this.$refs.treeControl.clear();
1152
+ if (this.$refs.treeControls)
1153
+ this.$refs.treeControls.clear();
1088
1154
  this.loading = true;
1089
1155
  this.isReady = false;
1090
1156
  this.$module.setFinishDownloadCallback(
@@ -1157,6 +1223,9 @@ export default {
1157
1223
  },
1158
1224
  syncControlCallback: function() {
1159
1225
  const payload = this.$module.NDCCameraControl.getPanZoom();
1226
+ if (this.tData.visible) {
1227
+ this.showRegionTooltip(this.tData.label);
1228
+ }
1160
1229
  this.$emit("scaffold-navigated", payload);
1161
1230
  },
1162
1231
  /**
@@ -123,11 +123,11 @@ export default {
123
123
  }
124
124
  },
125
125
  created: function() {
126
- let tmpArray = this.module.sceneData.geometries.concat(
127
- this.module.sceneData.lines
126
+ let tmpArray = this.module.primitiveData.geometries.concat(
127
+ this.module.primitiveData.lines
128
128
  );
129
- tmpArray = tmpArray.concat(this.module.sceneData.glyphsets);
130
- tmpArray = uniq(tmpArray.concat(this.module.sceneData.pointset));
129
+ tmpArray = tmpArray.concat(this.module.primitiveData.glyphsets);
130
+ tmpArray = uniq(tmpArray.concat(this.module.primitiveData.pointset));
131
131
  this.sortedPrimitiveGroups = orderBy(tmpArray);
132
132
  this.module.addOrganPartAddedCallback(this.organsAdded);
133
133
  },