@abi-software/mapintegratedvuer 1.3.4-beta.2 → 1.3.4-beta.3

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/mapintegratedvuer",
3
- "version": "1.3.4-beta.2",
3
+ "version": "1.3.4-beta.3",
4
4
  "license": "Apache-2.0",
5
5
  "scripts": {
6
6
  "serve": "vite --host --force",
package/src/App.vue CHANGED
@@ -23,9 +23,6 @@
23
23
  <el-button @click="setFlatmap()" size="small">Set Flatmap</el-button>
24
24
  <el-button @click="setSearch()" size="small">Set Search</el-button>
25
25
  </el-row>
26
- <el-row class="row" :gutter="20">
27
- <el-button @click="changeViewingMode('Annotation')" size="small">Switch to Annotation View</el-button>
28
- </el-row>
29
26
  </div>
30
27
  <template #reference>
31
28
 
@@ -172,6 +169,7 @@ export default {
172
169
  },
173
170
  mapIsReady: function() {
174
171
  console.log("map is ready")
172
+ // this.changeViewingMode('Annotation')
175
173
  },
176
174
  parseQuery: function () {
177
175
  this.$router.isReady().then(() => {
@@ -138,9 +138,6 @@ export default {
138
138
  onResize: function () {
139
139
  this.$refs.viewer?.onResize();
140
140
  },
141
- changeViewingMode: function(modeName) {
142
- this.$refs.viewer?.changeViewingMode(modeName);
143
- },
144
141
  },
145
142
  data: function () {
146
143
  return {
@@ -266,11 +266,6 @@ export default {
266
266
  */
267
267
  flowMounted: function () {
268
268
  this._flowMounted = true;
269
- /**
270
- * This event emit when the component is mounted.
271
- */
272
- this.$emit("isReady");
273
-
274
269
  // GA Tagging
275
270
  // Page view tracking for maps' buttons click on portal
276
271
  // category: AC | FC | WholeBody
@@ -281,7 +276,7 @@ export default {
281
276
  });
282
277
  },
283
278
  changeViewingMode: function(modeName) {
284
- this.$refs.flow.changeViewingMode(modeName);
279
+ EventBus.emit("changeViewingMode", modeName);
285
280
  },
286
281
  },
287
282
  computed: {
@@ -329,6 +324,12 @@ export default {
329
324
  if (!this.state) {
330
325
  this.initialState = await initialState(this.startingMap, this.options.sparcApi);
331
326
  }
327
+ EventBus.on('mapReady', () => {
328
+ /**
329
+ * This event emit when the component is mounted and map is ready.
330
+ */
331
+ if (this._flowMounted) this.$emit("isReady");
332
+ });
332
333
  this.isReady = true;
333
334
  this.settingsStore.updateUseHelpModeDialog(this.useHelpModeDialog);
334
335
  this.settingsStore.updateConnectivityInfoSidebar(this.connectivityInfoSidebar);
@@ -502,11 +502,6 @@ export default {
502
502
  activeCanvas.click();
503
503
  }
504
504
  },
505
- changeViewingMode: function(modeName) {
506
- let splitdialog = this.$refs.splitdialog;
507
- const activeContents = splitdialog.getActiveContents();
508
- activeContents.forEach(content => content.changeViewingMode(modeName));
509
- },
510
505
  },
511
506
  created: function () {
512
507
  this._facets = [];
@@ -103,6 +103,7 @@ export default {
103
103
  if (this.entry.resource === "FunctionalConnectivity"){
104
104
  this.flatmapReadyForMarkerUpdates(flatmap);
105
105
  }
106
+ EventBus.emit("mapReady", flatmap);
106
107
  },
107
108
  onPathwaySelectionChanged: function (data) {
108
109
  const { label, property, checked, selectionsTitle } = data;
@@ -159,8 +160,7 @@ export default {
159
160
  }
160
161
  },
161
162
  changeViewingMode: function (modeName) {
162
- const flatmap = this.$refs.flatmap.mapImp;
163
- flatmap.changeViewingMode(modeName);
163
+ this.$refs.flatmap.changeViewingMode(modeName);
164
164
  },
165
165
  },
166
166
  computed: {
@@ -185,6 +185,9 @@ export default {
185
185
  });
186
186
  }
187
187
  });
188
+ EventBus.on("changeViewingMode", (modeName) => {
189
+ this.changeViewingMode(modeName);
190
+ });
188
191
  },
189
192
  };
190
193
  </script>
@@ -329,6 +329,7 @@ export default {
329
329
  const flatmapImp = flatmap.mapImp;
330
330
  this.flatmapMarkerUpdate(flatmapImp);
331
331
  this.updateProvCard();
332
+ EventBus.emit("mapReady", flatmap);
332
333
  }
333
334
  },
334
335
  getFlatmapImp: function () {
@@ -458,6 +459,11 @@ export default {
458
459
  this.mapHoverHighlight(this.$refs.multiflatmap.getCurrentFlatmap().mapImp);
459
460
  }
460
461
  });
462
+ EventBus.on("changeViewingMode", (modeName) => {
463
+ if (this.flatmapReady) {
464
+ this.changeViewingMode(modeName);
465
+ }
466
+ });
461
467
  },
462
468
  };
463
469
  </script>
@@ -139,6 +139,7 @@ export default {
139
139
  this.$refs.scaffold.toggleSyncControl(this.splitFlowStore.globalCallback, rotation);
140
140
  if (this.splitFlowStore.syncMode) this.$refs.scaffold.fitWindow();
141
141
  }
142
+ EventBus.emit("mapReady", this.$refs.scaffold);
142
143
  },
143
144
  requestSynchronisedEvent: function (flag) {
144
145
  if (this.scaffoldLoaded) {
@@ -220,6 +221,11 @@ export default {
220
221
  this.mapHoverHighlight(this.$refs.scaffold);
221
222
  }
222
223
  });
224
+ EventBus.on("changeViewingMode", (modeName) => {
225
+ if (this.scaffoldLoaded) {
226
+ this.changeViewingMode(modeName);
227
+ }
228
+ });
223
229
  },
224
230
  };
225
231
  </script>
@@ -8,7 +8,7 @@ import { defineStore } from 'pinia'
8
8
  export const useMainStore = defineStore('main', {
9
9
  state: () => ({
10
10
  userProfile: {
11
- token: ''
11
+ token: 'eyJraWQiOiJ1UUMzRDl1RGpTTlhoNzZJRW1ldExcL05uOGRMazFyaU1LWSt5T2ZTUytHaz0iLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJjNDhmZDkyOS0wYjIwLTQxNjEtOTEyZi03NTBmMGZiY2VkNWQiLCJ0b2tlbl91c2UiOiJhY2Nlc3MiLCJzY29wZSI6Im9wZW5pZCIsImF1dGhfdGltZSI6MTcyMzA3ODgyOCwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfRlZMaEo3Q1FBIiwiZXhwIjoxNzIzMDgyNDI4LCJpYXQiOjE3MjMwNzg4MjgsInZlcnNpb24iOjIsImp0aSI6ImZiZDZiYmU5LWQwNjgtNGI1Ni05ZTcwLTJkZTJhMmFhNTdjYSIsImNsaWVudF9pZCI6IjcwM2xtNWQ4b2RjY3UyMXBhZ2NmamtlYWVhIiwidXNlcm5hbWUiOiJjNDhmZDkyOS0wYjIwLTQxNjEtOTEyZi03NTBmMGZiY2VkNWQifQ.QbLut-N287n6cPFl8KLytSsyv6OREwS30Xy_ydc-g5tOKItmAKry40MWQTDJNTXj8qetxn-dDsnvlwPm9Bf-L6cgKQcBRdKfTQ551PGLhkoSbCJYPFD7O1HRcf3WAdOU1uqmlSoQ-qlvX0r3GfYGgqctWghK4SmZyI6IsIe2-c6yl_A0mJDUwOL0Hfv7TKb0i_bGX-cxnDnGP0GJC8Szp4497PXb9iugbPosj-VWHmS_gKNt4SaByiUx0jmtfzCODMMjCjVNuZinc65xd1obPxiIuFPozLw2Ju6st7ShPz8iBG_r_uj9pfxiHSBEZDMvA4fMT9J_3CspVqs5iI5YYw'
12
12
  },
13
13
  }),
14
14
  getters: {