@abi-software/flatmapvuer 1.5.6 → 1.6.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/flatmapvuer",
3
- "version": "1.5.6",
3
+ "version": "1.6.0",
4
4
  "license": "Apache-2.0",
5
5
  "files": [
6
6
  "dist/*",
@@ -43,8 +43,8 @@
43
43
  "./src/*": "./src/*"
44
44
  },
45
45
  "dependencies": {
46
- "@abi-software/flatmap-viewer": "3.1.9",
47
- "@abi-software/map-utilities": "^1.1.2",
46
+ "@abi-software/flatmap-viewer": "^3.2.5",
47
+ "@abi-software/map-utilities": "^1.2.0",
48
48
  "@abi-software/sparc-annotation": "0.3.1",
49
49
  "@abi-software/svg-sprite": "^1.0.1",
50
50
  "@element-plus/icons-vue": "^2.3.1",
package/src/App.vue CHANGED
@@ -96,7 +96,8 @@
96
96
 
97
97
  <script>
98
98
  /* eslint-disable no-alert, no-console */
99
- import { shallowRef } from 'vue';
99
+ import { AnnotationService } from '@abi-software/sparc-annotation'
100
+ import { markRaw, shallowRef } from 'vue';
100
101
  import { Setting as ElIconSetting } from '@element-plus/icons-vue'
101
102
  import {
102
103
  ElAutocomplete as Autocomplete,
@@ -175,7 +176,8 @@ export default {
175
176
  const results = this.$refs.multi
176
177
  .getCurrentFlatmap()
177
178
  .searchSuggestions(term)
178
- results.__featureIds.forEach((id) => {
179
+ const featureIds = results.__featureIds || results.featureIds;
180
+ featureIds.forEach((id) => {
179
181
  const annotation = this.$refs.multi
180
182
  .getCurrentFlatmap()
181
183
  .mapImp.annotation(id)
@@ -195,8 +197,12 @@ export default {
195
197
  .getCurrentFlatmap()
196
198
  .searchAndShowResult(this.searchText, true)
197
199
  },
198
- onFlatmapChanged: function () {
200
+ onFlatmapChanged: function (activeSpecies) {
199
201
  this.helpMode = false;
202
+ // Update current flatmapImp after changing species
203
+ if (this.$refs.multi.$refs[activeSpecies][0].mapImp) {
204
+ window.flatmapImp = this.$refs.multi.$refs[activeSpecies][0].mapImp;
205
+ }
200
206
  },
201
207
  onHelpModeShowNext: function () {
202
208
  this.helpModeActiveItem += 1;
@@ -223,12 +229,17 @@ export default {
223
229
  }
224
230
  },
225
231
  },
232
+ provide() {
233
+ return {
234
+ $annotator: this.annotator,
235
+ }
236
+ },
226
237
  data: function () {
227
238
  return {
228
239
  consoleOn: true,
229
240
  searchText: '',
230
241
  disableUI: false,
231
- minZoom: 4,
242
+ minZoom: 1,
232
243
  availableSpecies: {
233
244
  'Human Female': {
234
245
  taxo: 'NCBITaxon:9606',
@@ -296,13 +307,14 @@ export default {
296
307
  mapSettings: [],
297
308
  //flatmapAPI: "https://mapcore-demo.org/current/flatmap/v2/"
298
309
  //flatmapAPI: "https://mapcore-demo.org/devel/flatmap/v3/"
299
- flatmapAPI: "https://mapcore-demo.org/current/flatmap/v3/",
300
- //flatmapAPI: 'https://mapcore-demo.org/devel/flatmap/v4/',
310
+ //flatmapAPI: "https://mapcore-demo.org/current/flatmap/v3/",
311
+ flatmapAPI: 'https://mapcore-demo.org/devel/flatmap/v4/',
301
312
  //flatmapAPI: 'https://mapcore-demo.org/curation/flatmap/',
302
313
  //flatmapAPI: "https://mapcore-demo.org/fccb/flatmap/"
303
314
  //flatmapAPI: "https://mapcore-demo.org/staging/flatmap/v1/"
304
315
  // flatmapAPI: "https://mapcore-demo.org/devel/flatmap/v1/",
305
- ElIconSetting: shallowRef(ElIconSetting)
316
+ ElIconSetting: shallowRef(ElIconSetting),
317
+ annotator: markRaw(new AnnotationService(`https://mapcore-demo.org/devel/flatmap/v4/annotator`)),
306
318
  }
307
319
  },
308
320
  mounted: function () {