@abi-software/mapintegratedvuer 1.3.5-beta.1 → 1.4.0

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.5-beta.1",
3
+ "version": "1.4.0",
4
4
  "license": "Apache-2.0",
5
5
  "scripts": {
6
6
  "serve": "vite --host --force",
@@ -50,11 +50,11 @@
50
50
  "*.js"
51
51
  ],
52
52
  "dependencies": {
53
- "@abi-software/flatmapvuer": "^1.3.2",
54
- "@abi-software/map-side-bar": "^2.3.2-beta.5",
55
- "@abi-software/map-utilities": "^1.0.1-beta.3",
53
+ "@abi-software/flatmapvuer": "^1.4.0",
54
+ "@abi-software/map-side-bar": "^2.4.1",
55
+ "@abi-software/map-utilities": "^1.1.0",
56
56
  "@abi-software/plotvuer": "1.0.0",
57
- "@abi-software/scaffoldvuer": "^1.3.3",
57
+ "@abi-software/scaffoldvuer": "^1.4.0",
58
58
  "@abi-software/simulationvuer": "1.0.0",
59
59
  "@abi-software/svg-sprite": "1.0.0",
60
60
  "@element-plus/icons-vue": "^2.3.1",
package/src/App.vue CHANGED
@@ -41,7 +41,8 @@
41
41
  :useHelpModeDialog="true"
42
42
  :connectivityInfoSidebar="true"
43
43
  @updateShareLinkRequested="updateUUID"
44
- @isReady="mapIsReady"
44
+ @isReady="viewerIsReady"
45
+ @mapLoaded="mapIsLoaded"
45
46
  />
46
47
  </div>
47
48
  </div>
@@ -99,6 +100,9 @@ export default {
99
100
  }
100
101
  },
101
102
  methods: {
103
+ changeViewingMode: function(modeName) {
104
+ this.$refs.map.changeViewingMode(modeName);
105
+ },
102
106
  saveSettings: function() {
103
107
  this.mapSettings.push(this.$refs.map.getState());
104
108
  },
@@ -164,8 +168,12 @@ export default {
164
168
  setSearch: function() {
165
169
  this.$refs.map.openSearch([], "10.26275/1uno-tynt");
166
170
  },
167
- mapIsReady: function() {
168
- console.log("map is ready")
171
+ mapIsLoaded: function(map) {
172
+ console.log("map is loaded", map)
173
+ // map.changeViewingMode('Annotation')
174
+ },
175
+ viewerIsReady: function() {
176
+ console.log("viewer is ready")
169
177
  },
170
178
  parseQuery: function () {
171
179
  this.$router.isReady().then(() => {
@@ -326,6 +326,12 @@ export default {
326
326
  if (!this.state) {
327
327
  this.initialState = await initialState(this.startingMap, this.options.sparcApi);
328
328
  }
329
+ EventBus.on("mapLoaded", (map) => {
330
+ /**
331
+ * This event emit when the map is loaded.
332
+ */
333
+ this.$emit("mapLoaded", map);
334
+ });
329
335
  this.isReady = true;
330
336
  this.settingsStore.updateUseHelpModeDialog(this.useHelpModeDialog);
331
337
  this.settingsStore.updateConnectivityInfoSidebar(this.connectivityInfoSidebar);
@@ -100,9 +100,8 @@ export default {
100
100
  let provClone = {id: this.entry.id, prov: this.getFlatmapImp().provenance}; //create clone of provenance and add id
101
101
  EventBus.emit("mapImpProv", provClone); // send clone to context card
102
102
  this.$emit("flatmap-provenance-ready", provClone);
103
- if (this.entry.resource === "FunctionalConnectivity"){
104
- this.flatmapReadyForMarkerUpdates(flatmap);
105
- }
103
+ this.flatmapReadyForMarkerUpdates(flatmap);
104
+ EventBus.emit("mapLoaded", flatmap);
106
105
  },
107
106
  onPathwaySelectionChanged: function (data) {
108
107
  const { label, property, checked, selectionsTitle } = data;
@@ -158,6 +157,9 @@ export default {
158
157
  flatmap.clearSearchResults();
159
158
  }
160
159
  },
160
+ changeViewingMode: function (modeName) {
161
+ this.$refs.flatmap.changeViewingMode(modeName);
162
+ },
161
163
  },
162
164
  computed: {
163
165
  facetSpecies() {
@@ -329,6 +329,7 @@ export default {
329
329
  const flatmapImp = flatmap.mapImp;
330
330
  this.flatmapMarkerUpdate(flatmapImp);
331
331
  this.updateProvCard();
332
+ EventBus.emit("mapLoaded", flatmap);
332
333
  }
333
334
  },
334
335
  getFlatmapImp: function () {
@@ -404,6 +405,13 @@ export default {
404
405
  }
405
406
  return false;
406
407
  },
408
+ /**
409
+ * Change the view mode of the current flatmap
410
+ */
411
+ changeViewingMode: function (modeName) {
412
+ const flatmap = this.$refs.multiflatmap.getCurrentFlatmap();
413
+ flatmap.changeViewingMode(modeName);
414
+ },
407
415
  },
408
416
  computed: {
409
417
  facetSpecies() {
@@ -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("mapLoaded", this.$refs.scaffold);
142
143
  },
143
144
  requestSynchronisedEvent: function (flag) {
144
145
  if (this.scaffoldLoaded) {
@@ -183,6 +184,12 @@ export default {
183
184
  updateWithViewUrl: function(viewUrl) {
184
185
  this.$refs.scaffold.updateViewURL(viewUrl);
185
186
  },
187
+ /**
188
+ * Change the view mode of the current scaffold
189
+ */
190
+ changeViewingMode: function (modeName) {
191
+ this.$refs.scaffold.changeViewingMode(modeName);
192
+ },
186
193
  },
187
194
  computed: {
188
195
  warningMessage: function() {
@@ -47,7 +47,15 @@ export default {
47
47
  let fmMarkers = this.removeMarkersNotOnFlatmap(flatmapImp, markers);
48
48
  flatmapImp.clearMarkers();
49
49
  flatmapImp.clearDatasetMarkers();
50
- flatmapImp.addDatasetMarkers(fmMarkers);
50
+ if (this.entry.resource === "FunctionalConnectivity") {
51
+ let FCMapMarkers = [];
52
+ for (let i = 0; i < fmMarkers.length; i++) {
53
+ FCMapMarkers = FCMapMarkers.concat(fmMarkers[i].terms);
54
+ }
55
+ flatmapImp.addMarkers(Array.from(new Set(FCMapMarkers)), { className: "standard-marker", cluster: false });
56
+ } else {
57
+ flatmapImp.addDatasetMarkers(fmMarkers);
58
+ }
51
59
 
52
60
  // Set the featured markers
53
61
  if (this.entry.type === "MultiFlatmap") {
@@ -208,7 +208,7 @@ export const useSplitFlowStore = defineStore('splitFlow', {
208
208
  if (this._controller) this._controller.abort();
209
209
  this._controller = new AbortController();
210
210
  let signal = this._controller.signal;
211
- console.log("getAvailableTerms")
211
+ // console.log("getAvailableTerms")
212
212
  fetch(`${apiLocation}get-organ-curies`, {
213
213
  signal,
214
214
  })