@abi-software/scaffoldvuer 1.11.0-beta.2 → 1.11.0-beta.4

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.11.0-beta.2",
3
+ "version": "1.11.0-beta.4",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div
3
- v-show="material || isTextureSlides"
3
+ v-show="hasValidPrimitive"
4
4
  class="primitive-controls"
5
5
  :class="{ open: drawerOpen, close: !drawerOpen }"
6
6
  >
@@ -85,6 +85,10 @@ export default {
85
85
  createData: {
86
86
  type: Object,
87
87
  },
88
+ viewingMode: {
89
+ type: String,
90
+ default: "Exploration",
91
+ }
88
92
  },
89
93
  data: function() {
90
94
  return {
@@ -99,6 +103,14 @@ export default {
99
103
  displayString: "100%"
100
104
  };
101
105
  },
106
+ computed: {
107
+ hasValidPrimitive: function () {
108
+ if (this.viewingMode === 'Exploration' || this.viewingMode === 'Annotation') {
109
+ return (this.material !== undefined || this.isTextureSlides === true);
110
+ }
111
+ return false;
112
+ }
113
+ },
102
114
  methods: {
103
115
  formatTooltip: function(val) {
104
116
  this.displayString = Math.floor(100 * val + 0.5) + "%";
@@ -109,9 +109,9 @@
109
109
  </el-popover>
110
110
  <div class="primitive-controls-box">
111
111
  <primitive-controls
112
- v-show="viewingMode === 'Exploration' || viewingMode === 'Annotation'"
113
112
  ref="primitiveControls"
114
113
  :createData="createData"
114
+ :viewingMode="viewingMode"
115
115
  @primitivesUpdated="primitivesUpdated"
116
116
  />
117
117
  </div>
@@ -1044,7 +1044,7 @@ export default {
1044
1044
  },
1045
1045
  */
1046
1046
  /**
1047
- *
1047
+ *
1048
1048
  * @param nerves array of nerve names, show all nerves if empty
1049
1049
  * @param processed boolean, whether unselect all checkboxes
1050
1050
  */
@@ -1114,7 +1114,7 @@ export default {
1114
1114
  idsList.push(region.uuid);
1115
1115
  }
1116
1116
  }
1117
-
1117
+
1118
1118
  });
1119
1119
  if (nerves.length) {
1120
1120
  this.fitWindow();
@@ -2249,7 +2249,9 @@ export default {
2249
2249
  this.activeDrawMode = undefined;
2250
2250
  this.createData.shape = "";
2251
2251
  } else if (this.viewingMode === "Neuron Connection") {
2252
- nonNervesIsPickable = false;
2252
+ // TODO: to review
2253
+ // enable to make organs and nerves clickable and searchable for neuron connection mode
2254
+ // nonNervesIsPickable = false;
2253
2255
  }
2254
2256
  if ((this.viewingMode === "Exploration") ||
2255
2257
  (this.viewingMode === "Annotation") &&
@@ -2297,7 +2299,7 @@ export default {
2297
2299
  });
2298
2300
  },
2299
2301
  /**
2300
- *
2302
+ *
2301
2303
  * @param flag boolean
2302
2304
  * @param nerves array of nerve names
2303
2305
  */
@@ -2323,7 +2325,7 @@ export default {
2323
2325
  */
2324
2326
  setColour: function (flag, forced = false) {
2325
2327
  if (this.isReady && this.$module.scene &&
2326
- typeof flag === "boolean" &&
2328
+ typeof flag === "boolean" &&
2327
2329
  (forced || flag !== this.colourRadio)) {
2328
2330
  this.loading = true;
2329
2331
  //This can take sometime to finish , nextTick does not bring out
@@ -2334,7 +2336,7 @@ export default {
2334
2336
  this.colourRadio = flag;
2335
2337
  }, 100);
2336
2338
  }
2337
- },
2339
+ },
2338
2340
  /**
2339
2341
  * @public
2340
2342
  * Function to toggle lines graphics.
@@ -2343,7 +2345,7 @@ export default {
2343
2345
  */
2344
2346
  setOutlines: function (flag, forced = false) {
2345
2347
  if (this.isReady && this.$module.scene &&
2346
- typeof flag === "boolean" &&
2348
+ typeof flag === "boolean" &&
2347
2349
  (forced || flag !== this.outlinesRadio)) {
2348
2350
  this.outlinesRadio = flag;
2349
2351
  this.$nextTick(() => this.$refs.scaffoldTreeControls.setOutlines(flag));
@@ -2515,7 +2517,7 @@ export default {
2515
2517
  if (options.offlineAnnotations) {
2516
2518
  sessionStorage.setItem('anonymous-annotation', options.offlineAnnotations);
2517
2519
  }
2518
- if ("outlines" in options) {
2520
+ if ("outlines" in options) {
2519
2521
  this.setOutlines(options.outlines);
2520
2522
  }
2521
2523
  if (options.viewingMode) {
@@ -822,7 +822,6 @@ const getNerveMaps = () => {
822
822
  });
823
823
  }
824
824
  });
825
- console.log(curatedMap)
826
825
  return curatedMap;
827
826
  }
828
827