@abi-software/flatmapvuer 1.4.1 → 1.4.3-image.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.4.1",
3
+ "version": "1.4.3-image.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.4",
47
- "@abi-software/map-utilities": "1.1.0",
46
+ "@abi-software/flatmap-viewer": "3.1.7",
47
+ "@abi-software/map-utilities": "^1.1.0-beta.2",
48
48
  "@abi-software/sparc-annotation": "0.3.1",
49
49
  "@abi-software/svg-sprite": "1.0.0",
50
50
  "@element-plus/icons-vue": "^2.3.1",
@@ -59,7 +59,7 @@
59
59
  "@cypress/webpack-dev-server": "^3.6.1",
60
60
  "@vitejs/plugin-vue": "^4.6.2",
61
61
  "@vuese/markdown-render": "^2.11.3",
62
- "@vuese/parser": "^2.10.3",
62
+ "@vuese/parser": "^2.9.1",
63
63
  "auto-changelog": "^2.4.0",
64
64
  "babel-eslint": "^10.1.0",
65
65
  "chokidar": "^3.6.0",
@@ -92,5 +92,8 @@
92
92
  "browserslist": [
93
93
  "> 1%",
94
94
  "last 2 versions"
95
- ]
95
+ ],
96
+ "optionalDependencies": {
97
+ "@rollup/rollup-linux-x64-gnu": "^4.21.1"
98
+ }
96
99
  }
package/src/App.vue CHANGED
@@ -77,6 +77,7 @@
77
77
  :displayMinimap="true"
78
78
  :enableOpenMapUI="true"
79
79
  :flatmapAPI="flatmapAPI"
80
+ :sparcAPI="sparcAPI"
80
81
  :disableUI="disableUI"
81
82
  @open-pubmed-url="onOpenPubmedUrl"
82
83
  @pathway-selection-changed="onPathwaySelectionChanged"
@@ -109,6 +110,9 @@ import './icons/mapicon-species-style.css'
109
110
  import MultiFlatmapVuer from './components/MultiFlatmapVuer.vue'
110
111
  import { HelpModeDialog } from '@abi-software/map-utilities'
111
112
  import '@abi-software/map-utilities/dist/style.css'
113
+ import { mapStores } from 'pinia';
114
+ import { useSettingsStore } from './stores/settings';
115
+ import { getOrganCuries } from './services/scicrunchQueries'
112
116
 
113
117
  export default {
114
118
  name: 'app',
@@ -145,6 +149,7 @@ export default {
145
149
  if (this.consoleOn) console.log(component)
146
150
  let taxon = component.mapImp.describes
147
151
  let id = component.mapImp.addMarker('UBERON:0000948')
152
+
148
153
  window.flatmapImp = component.mapImp
149
154
  component.enablePanZoomEvents(true)
150
155
  //component.showPathwaysDrawer(false);
@@ -285,6 +290,7 @@ export default {
285
290
  useHelpModeDialog: true,
286
291
  multiflatmapRef: null,
287
292
  mapSettings: [],
293
+ sparcAPI: import.meta.env.VITE_SPARC_API,
288
294
  //flatmapAPI: "https://mapcore-demo.org/current/flatmap/v2/"
289
295
  //flatmapAPI: "https://mapcore-demo.org/devel/flatmap/v3/"
290
296
  flatmapAPI: "https://mapcore-demo.org/current/flatmap/v3/",
@@ -293,11 +299,17 @@ export default {
293
299
  //flatmapAPI: "https://mapcore-demo.org/fccb/flatmap/"
294
300
  //flatmapAPI: "https://mapcore-demo.org/staging/flatmap/v1/"
295
301
  // flatmapAPI: "https://mapcore-demo.org/devel/flatmap/v1/",
296
- ElIconSetting: shallowRef(ElIconSetting)
302
+ ElIconSetting: shallowRef(ElIconSetting),
297
303
  }
298
304
  },
299
305
  mounted: function () {
300
306
  this.multiflatmapRef = this.$refs.multi;
307
+ if (this.sparcAPI) {
308
+ getOrganCuries(this.sparcAPI).then((organCuries) => this.settingsStore.updateOrganCuries(organCuries))
309
+ }
310
+ },
311
+ computed: {
312
+ ...mapStores(useSettingsStore),
301
313
  },
302
314
  watch: {
303
315
  helpMode: function (newVal) {
@@ -176,13 +176,17 @@ Please use `const` to assign meaningful names to them...
176
176
  ref="zoomInPopover"
177
177
  >
178
178
  <template #reference>
179
- <map-svg-icon
180
- icon="zoomIn"
181
- class="icon-button zoomIn"
179
+ <div
180
+ class="icon-button-container"
182
181
  @click="zoomIn()"
183
182
  @mouseover="showTooltip(1)"
184
183
  @mouseout="hideTooltip(1)"
185
- />
184
+ >
185
+ <map-svg-icon
186
+ class="icon-button zoomIn"
187
+ icon="zoomIn"
188
+ />
189
+ </div>
186
190
  </template>
187
191
  </el-popover>
188
192
  <el-popover
@@ -196,13 +200,17 @@ Please use `const` to assign meaningful names to them...
196
200
  ref="zoomOutPopover"
197
201
  >
198
202
  <template #reference>
199
- <map-svg-icon
200
- icon="zoomOut"
201
- class="icon-button zoomOut"
203
+ <div
204
+ class="icon-button-container"
202
205
  @click="zoomOut()"
203
206
  @mouseover="showTooltip(2)"
204
207
  @mouseout="hideTooltip(2)"
205
- />
208
+ >
209
+ <map-svg-icon
210
+ class="icon-button zoomOut"
211
+ icon="zoomOut"
212
+ />
213
+ </div>
206
214
  </template>
207
215
  </el-popover>
208
216
  <el-popover
@@ -221,13 +229,17 @@ Please use `const` to assign meaningful names to them...
221
229
  window
222
230
  </div>
223
231
  <template #reference>
224
- <map-svg-icon
225
- icon="fitWindow"
226
- class="icon-button fitWindow"
232
+ <div
233
+ class="icon-button-container"
227
234
  @click="resetView()"
228
235
  @mouseover="showTooltip(3)"
229
236
  @mouseout="hideTooltip(3)"
230
- />
237
+ >
238
+ <map-svg-icon
239
+ class="icon-button fitWindow"
240
+ icon="fitWindow"
241
+ />
242
+ </div>
231
243
  </template>
232
244
  </el-popover>
233
245
  </div>
@@ -285,7 +297,7 @@ Please use `const` to assign meaningful names to them...
285
297
  width="200"
286
298
  trigger="manual"
287
299
  popper-class="flatmap-popper flatmap-marker-popper"
288
- :visible="hoverVisibilities[5].value"
300
+ :visible="hoverVisibilities[0].value"
289
301
  ref="markerPopover"
290
302
  >
291
303
  <template #reference>
@@ -426,7 +438,7 @@ Please use `const` to assign meaningful names to them...
426
438
  ref="backgroundPopover"
427
439
  :virtual-ref="backgroundIconRef"
428
440
  placement="top-start"
429
- width="320"
441
+ width="330"
430
442
  :teleported="false"
431
443
  trigger="click"
432
444
  popper-class="background-popper h-auto"
@@ -453,13 +465,14 @@ Please use `const` to assign meaningful names to them...
453
465
  </el-row>
454
466
  </el-row>
455
467
  <template v-if="viewingMode === 'Annotation' && userInformation">
468
+ <el-row class="backgroundSpacer"></el-row>
456
469
  <el-row class="backgroundText">Drawn By*</el-row>
457
470
  <el-row class="backgroundControl">
458
471
  <el-select
459
472
  :teleported="false"
460
473
  v-model="drawnType"
461
474
  placeholder="Select"
462
- class="select-box"
475
+ class="select-box annotationSelector"
463
476
  popper-class="flatmap_dropdown"
464
477
  @change="setDrawnType"
465
478
  >
@@ -475,13 +488,14 @@ Please use `const` to assign meaningful names to them...
475
488
  </el-option>
476
489
  </el-select>
477
490
  </el-row>
491
+ <el-row class="backgroundSpacer"></el-row>
478
492
  <el-row class="backgroundText">Annotated By*</el-row>
479
493
  <el-row class="backgroundControl">
480
494
  <el-select
481
495
  :teleported="false"
482
496
  v-model="annotatedType"
483
497
  placeholder="Select"
484
- class="select-box"
498
+ class="select-box annotationSelector"
485
499
  popper-class="flatmap_dropdown"
486
500
  @change="setAnnotatedType"
487
501
  >
@@ -498,18 +512,59 @@ Please use `const` to assign meaningful names to them...
498
512
  </el-select>
499
513
  </el-row>
500
514
  </template>
501
- <el-row class="backgroundSpacer" v-if="displayFlightPathOption"></el-row>
502
- <el-row class="backgroundText" v-if="displayFlightPathOption">Flight path display</el-row>
503
- <el-row class="backgroundControl" v-if="displayFlightPathOption">
504
- <el-radio-group
505
- v-model="flightPath3DRadio"
506
- class="flatmap-radio"
507
- @change="setFlightPath3D"
508
- >
509
- <el-radio :label="false">2D</el-radio>
510
- <el-radio :label="true">3D</el-radio>
511
- </el-radio-group>
512
- </el-row>
515
+ <template v-if="viewingMode === 'Exploration' && !isFC && sparcAPI">
516
+ <el-row class="backgroundSpacer"></el-row>
517
+ <el-row class="backgroundText">Markers display</el-row>
518
+ <el-row class="backgroundControl">
519
+ <el-col :span="14">
520
+ <el-radio-group
521
+ v-model="imageRadio"
522
+ class="flatmap-radio"
523
+ :disabled="imagesDownloading"
524
+ @change="setImage"
525
+ >
526
+ <el-radio :label="false">Standard</el-radio>
527
+ <el-radio :label="true">Image</el-radio>
528
+ </el-radio-group>
529
+ </el-col>
530
+ <el-col :span="10" v-if="imageRadio">
531
+ <el-select
532
+ :teleported="false"
533
+ v-model="imageType"
534
+ placeholder="Select"
535
+ class="select-box imageSelector"
536
+ popper-class="flatmap_dropdown"
537
+ :disabled="imagesDownloading"
538
+ @change="setImageType"
539
+ >
540
+ <el-option
541
+ v-for="item in imageTypes"
542
+ :key="item"
543
+ :label="item"
544
+ :value="item"
545
+ >
546
+ <el-row>
547
+ <el-col :span="12">{{ item }}</el-col>
548
+ </el-row>
549
+ </el-option>
550
+ </el-select>
551
+ </el-col>
552
+ </el-row>
553
+ </template>
554
+ <template v-if="displayFlightPathOption">
555
+ <el-row class="backgroundSpacer"></el-row>
556
+ <el-row class="backgroundText">Flight path display</el-row>
557
+ <el-row class="backgroundControl">
558
+ <el-radio-group
559
+ v-model="flightPath3DRadio"
560
+ class="flatmap-radio"
561
+ @change="setFlightPath3D"
562
+ >
563
+ <el-radio :label="false">2D</el-radio>
564
+ <el-radio :label="true">3D</el-radio>
565
+ </el-radio-group>
566
+ </el-row>
567
+ </template>
513
568
  <el-row class="backgroundSpacer"></el-row>
514
569
  <el-row class="backgroundText">Organs display</el-row>
515
570
  <el-row class="backgroundControl">
@@ -565,14 +620,18 @@ Please use `const` to assign meaningful names to them...
565
620
  ref="openMapPopover"
566
621
  >
567
622
  <template #reference>
568
- <map-svg-icon
623
+ <div
569
624
  v-if="enableOpenMapUI && openMapOptions.length > 0"
570
625
  ref="openMapRef"
571
- icon="openMap"
572
- class="icon-button open-map-button"
626
+ class="icon-button-container"
573
627
  @mouseover="showTooltip(4)"
574
628
  @mouseout="hideTooltip(4)"
575
- />
629
+ >
630
+ <map-svg-icon
631
+ icon="openMap"
632
+ class="icon-button open-map-button"
633
+ />
634
+ </div>
576
635
  </template>
577
636
  </el-popover>
578
637
  </el-row>
@@ -587,13 +646,17 @@ Please use `const` to assign meaningful names to them...
587
646
  ref="settingsPopover"
588
647
  >
589
648
  <template #reference>
590
- <map-svg-icon
649
+ <div
591
650
  ref="backgroundIconRef"
592
- icon="changeBckgd"
593
- class="icon-button"
651
+ class="icon-button-container"
594
652
  @mouseover="showTooltip(5)"
595
653
  @mouseout="hideTooltip(5)"
596
- />
654
+ >
655
+ <map-svg-icon
656
+ icon="changeBckgd"
657
+ class="icon-button"
658
+ />
659
+ </div>
597
660
  </template>
598
661
  </el-popover>
599
662
  </el-row>
@@ -602,9 +665,10 @@ Please use `const` to assign meaningful names to them...
602
665
  ref="tooltip"
603
666
  class="tooltip"
604
667
  v-show="tooltipDisplay"
668
+ :tooltipType="tooltipType"
669
+ :provenanceEntry="provenanceEntry"
605
670
  :annotationEntry="annotationEntry"
606
- :tooltipEntry="tooltipEntry"
607
- :annotationDisplay="viewingMode === 'Annotation'"
671
+ :imageEntry="imageEntry"
608
672
  @annotation="commitAnnotationEvent"
609
673
  />
610
674
  </div>
@@ -643,10 +707,18 @@ import yellowstar from '../icons/yellowstar'
643
707
  import ResizeSensor from 'css-element-queries/src/ResizeSensor'
644
708
  import * as flatmap from '@abi-software/flatmap-viewer'
645
709
  import { AnnotationService } from '@abi-software/sparc-annotation'
646
- import { mapState } from 'pinia'
647
- import { useMainStore } from '@/store/index'
710
+ import { mapState, mapStores } from 'pinia'
711
+ import { useMainStore } from '@/stores/index'
712
+ import { useSettingsStore } from '@/stores/settings'
648
713
  import { DrawToolbar, Tooltip, TreeControls } from '@abi-software/map-utilities'
649
714
  import '@abi-software/map-utilities/dist/style.css'
715
+ import {
716
+ getBiolucidaThumbnails,
717
+ getSegmentationThumbnails,
718
+ getScaffoldThumbnails,
719
+ getPlotThumbnails
720
+ } from '../services/scicrunchQueries'
721
+ import imageMixin from '../mixins/imageMixin'
650
722
 
651
723
  const centroid = (geometry) => {
652
724
  let featureGeometry = { lng: 0, lat: 0, }
@@ -735,6 +807,7 @@ const createUnfilledTooltipData = function () {
735
807
  */
736
808
  export default {
737
809
  name: 'FlatmapVuer',
810
+ mixins:[imageMixin],
738
811
  components: {
739
812
  Button,
740
813
  Col,
@@ -767,6 +840,71 @@ export default {
767
840
  return { annotator }
768
841
  },
769
842
  methods: {
843
+ /**
844
+ * @vuese
845
+ * Function to add image thumbnails to the map.
846
+ */
847
+ populateImageThumbnails: async function (type) {
848
+ if (this.mapImp) {
849
+ this.closeTooltip()
850
+ this.mapImp.clearMarkers();
851
+ const identifiers = this.mapImp.anatomicalIdentifiers
852
+ const imageThumbnails = this.settingsStore.getImageThumbnails(type, identifiers)
853
+ this.populateMapWithImages(this.mapImp, imageThumbnails, type)
854
+ }
855
+ },
856
+ /**
857
+ * @vuese
858
+ * Function to fetching image thumbnails.
859
+ */
860
+ fetchImageThumbnails: async function (type) {
861
+ let thumbnails = {}
862
+ const organCuries = this.settingsStore.organCuries
863
+ if (type === 'Image') {
864
+ thumbnails = await getBiolucidaThumbnails(this.sparcAPI, organCuries, type)
865
+ } else if (type === 'Segmentation') {
866
+ thumbnails = await getSegmentationThumbnails(this.sparcAPI, organCuries, type)
867
+ } else if (type === 'Scaffold') {
868
+ thumbnails = await getScaffoldThumbnails(this.sparcAPI, organCuries, type)
869
+ } else if (type === 'Plot') {
870
+ thumbnails = await getPlotThumbnails(this.sparcAPI, organCuries, type)
871
+ }
872
+ this.settingsStore.updateImageThumbnails(type, thumbnails)
873
+ },
874
+ /**
875
+ * @vuese
876
+ * Function to switch the type of displayed image.
877
+ * @arg type
878
+ */
879
+ setImageType: async function (type) {
880
+ this.imageType = type
881
+ if (this.mapImp) {
882
+ this.imagesDownloading = true;
883
+ if (!this.settingsStore.imageTypeCached(type)) {
884
+ this.loading = true
885
+ await this.fetchImageThumbnails(type)
886
+ this.loading = false
887
+ }
888
+ this.populateImageThumbnails(type)
889
+ }
890
+ },
891
+ /**
892
+ * @vuese
893
+ * Function to switch show or hide images.
894
+ * @arg flag
895
+ */
896
+ setImage: function (flag) {
897
+ this.imageRadio = flag
898
+ if (this.mapImp) {
899
+ if (flag) {
900
+ this.setImageType(this.imageType)
901
+ } else {
902
+ this.mapImp.clearMarkers();
903
+ this.closeTooltip();
904
+ }
905
+ this.$emit('imageThumbnailDisplay', flag)
906
+ }
907
+ },
770
908
  /**
771
909
  * @vuese
772
910
  * Function to initialise drawing.
@@ -1494,7 +1632,7 @@ export default {
1494
1632
  this.mapImp.zoomToGeoJSONFeatures(gid, {noZoomIn: true})
1495
1633
  } else {
1496
1634
  // reset visibility of paths
1497
- this.mapImp.selectGeoJSONFeatures("-1")
1635
+ this.mapImp.unselectGeoJSONFeatures()
1498
1636
  payload.selections.forEach((item) => {
1499
1637
  let show = payload.checked.includes(item.taxon)
1500
1638
  this.mapImp.enableConnectivityByTaxonIds(item.taxon, show)
@@ -1635,6 +1773,7 @@ export default {
1635
1773
  userData: args,
1636
1774
  eventType: eventType,
1637
1775
  provenanceTaxonomy: taxons,
1776
+ markerType: this.imageRadio ? this.imageType : "Standard",
1638
1777
  }
1639
1778
  if (eventType === 'click') {
1640
1779
  this.featuresAlert = data.alert
@@ -1669,7 +1808,6 @@ export default {
1669
1808
  }
1670
1809
  if (
1671
1810
  data &&
1672
- data.type !== 'marker' &&
1673
1811
  eventType === 'click' &&
1674
1812
  !(this.viewingMode === 'Neuron Connection') &&
1675
1813
  // Disable popup when drawing
@@ -1703,6 +1841,16 @@ export default {
1703
1841
  * @arg data
1704
1842
  */
1705
1843
  checkAndCreatePopups: async function (data) {
1844
+ this.imageEntry = []
1845
+ this.provenanceEntry = {}
1846
+ if (data.feature.type === 'marker' && this.imageRadio) {
1847
+ this.tooltipType = 'image'
1848
+ const imageThumbnails = this.settingsStore.getImageThumbnails(this.imageType, [data.resource[0]])
1849
+ if (data.resource[0] in imageThumbnails) {
1850
+ this.imageEntry = markRaw(imageThumbnails[data.resource[0]])
1851
+ }
1852
+ this.displayTooltip(data.feature.models)
1853
+ } else {
1706
1854
  // Call flatmap database to get the connection data
1707
1855
  if (this.viewingMode === 'Annotation') {
1708
1856
  if (data.feature) {
@@ -1710,6 +1858,7 @@ export default {
1710
1858
  ...data.feature,
1711
1859
  resourceId: this.serverURL,
1712
1860
  }
1861
+ this.tooltipType = 'annotation'
1713
1862
  if (data.feature.featureId && data.feature.models) {
1714
1863
  this.displayTooltip(data.feature.models)
1715
1864
  } else if (data.feature.feature) {
@@ -1743,9 +1892,11 @@ export default {
1743
1892
  results[1] ||
1744
1893
  (data.feature.hyperlinks && data.feature.hyperlinks.length > 0)
1745
1894
  ) {
1895
+ this.tooltipType = 'provenance'
1746
1896
  this.resourceForTooltip = data.resource[0]
1747
1897
  data.resourceForTooltip = this.resourceForTooltip
1748
1898
  this.createTooltipFromNeuronCuration(data)
1899
+ }
1749
1900
  }
1750
1901
  }
1751
1902
  },
@@ -1784,7 +1935,7 @@ export default {
1784
1935
  * @arg data
1785
1936
  */
1786
1937
  createTooltipFromNeuronCuration: async function (data) {
1787
- this.tooltipEntry = await this.flatmapQueries.createTooltipData(data)
1938
+ this.provenanceEntry = await this.flatmapQueries.createTooltipData(data)
1788
1939
  this.displayTooltip(data.resource[0])
1789
1940
  },
1790
1941
  /**
@@ -1985,7 +2136,7 @@ export default {
1985
2136
  options.annotationFeatureGeometry = geometry
1986
2137
  } else {
1987
2138
  featureId = this.mapImp.modelFeatureIds(feature)[0]
1988
- if (!this.activeDrawTool) {
2139
+ if (!this.activeDrawTool && !this.imageEntry.length) {
1989
2140
  options.positionAtLastClick = true
1990
2141
  }
1991
2142
  }
@@ -1997,9 +2148,12 @@ export default {
1997
2148
  // const featureIds = [feature];
1998
2149
  // this.moveMap(featureIds);
1999
2150
  if (this.featuresAlert) {
2000
- this.tooltipEntry['featuresAlert'] = this.featuresAlert;
2151
+ this.provenanceEntry['featuresAlert'] = this.featuresAlert;
2001
2152
  }
2002
- this.$emit('connectivity-info-open', this.tooltipEntry);
2153
+ this.$emit('connectivity-info-open', this.provenanceEntry);
2154
+ }
2155
+ if (this.imageThumbnailSidebar && this.viewingMode === 'Exploration') {
2156
+ this.$emit('image-thumbnail-open', this.imageEntry)
2003
2157
  }
2004
2158
  // If UI is not disabled,
2005
2159
  // And connectivityInfoSidebar is not set (default) or set to `false`
@@ -2010,8 +2164,10 @@ export default {
2010
2164
  this.viewingMode === 'Annotation' ||
2011
2165
  (
2012
2166
  this.viewingMode === 'Exploration' &&
2013
- !this.connectivityInfoSidebar &&
2014
- this.hasTooltipEntry()
2167
+ (
2168
+ (!this.connectivityInfoSidebar && this.hasTooltipEntry()) ||
2169
+ (!this.imageThumbnailSidebar && this.imageEntry.length)
2170
+ )
2015
2171
  )
2016
2172
  )
2017
2173
  ) {
@@ -2030,7 +2186,7 @@ export default {
2030
2186
  origins,
2031
2187
  provenanceTaxonomy,
2032
2188
  provenanceTaxonomyLabel
2033
- } = this.tooltipEntry;
2189
+ } = this.provenanceEntry;
2034
2190
 
2035
2191
  return Boolean(
2036
2192
  components?.length ||
@@ -2334,9 +2490,9 @@ export default {
2334
2490
  this.addResizeButtonToMinimap()
2335
2491
  this.loading = false
2336
2492
  this.computePathControlsMaximumHeight()
2337
- this.drawerOpen = !this.isCentreLine
2493
+ this.drawerOpen = !this.isCentreLine
2338
2494
  this.mapResize()
2339
- this.handleMapClick();
2495
+ this.handleMapClick()
2340
2496
  /**
2341
2497
  * This is ``onFlatmapReady`` event.
2342
2498
  * @arg ``this`` (Component Vue Instance)
@@ -2353,7 +2509,8 @@ export default {
2353
2509
 
2354
2510
  if (_map) {
2355
2511
  _map.on('click', (e) => {
2356
- if (this.tooltipEntry.featureId) {
2512
+ // Tmeporary add imageEntry length
2513
+ if (this.provenanceEntry.featureId || this.imageEntry.length) {
2357
2514
  this.$emit('connectivity-info-close');
2358
2515
  }
2359
2516
  });
@@ -2600,12 +2757,12 @@ export default {
2600
2757
  */
2601
2758
  sparcAPI: {
2602
2759
  type: String,
2603
- default: 'https://api.sparc.science/',
2760
+ default: '',
2604
2761
  },
2605
2762
  /**
2606
2763
  * Flag to disable UIs on Map
2607
2764
  */
2608
- disableUI: {
2765
+ disableUI: {
2609
2766
  type: Boolean,
2610
2767
  default: false,
2611
2768
  },
@@ -2616,11 +2773,17 @@ export default {
2616
2773
  type: Boolean,
2617
2774
  default: false,
2618
2775
  },
2776
+ /**
2777
+ * The option to show image thumbnail in sidebar
2778
+ */
2779
+ imageThumbnailSidebar: {
2780
+ type: Boolean,
2781
+ default: false,
2782
+ },
2619
2783
  },
2620
2784
  provide() {
2621
2785
  return {
2622
2786
  flatmapAPI: this.flatmapAPI,
2623
- sparcAPI: this.sparcAPI,
2624
2787
  $annotator: this.annotator,
2625
2788
  getFeaturesAlert: () => this.featuresAlert,
2626
2789
  userApiKey: this.userToken,
@@ -2639,6 +2802,8 @@ export default {
2639
2802
  serverURL: undefined,
2640
2803
  layers: [],
2641
2804
  pathways: [],
2805
+ imageEntry: markRaw([]),
2806
+ tooltipType: 'provenance',
2642
2807
  sckanDisplay: [
2643
2808
  {
2644
2809
  label: 'Display Path with SCKAN',
@@ -2682,8 +2847,9 @@ export default {
2682
2847
  currentBackground: 'white',
2683
2848
  availableBackground: ['white', 'lightskyblue', 'black'],
2684
2849
  loading: false,
2850
+ imagesDownloading: false,
2685
2851
  flatmapMarker: flatmapMarker,
2686
- tooltipEntry: createUnfilledTooltipData(),
2852
+ provenanceEntry: createUnfilledTooltipData(),
2687
2853
  connectivityTooltipVisible: false,
2688
2854
  drawerOpen: false,
2689
2855
  featuresAlert: undefined,
@@ -2706,6 +2872,9 @@ export default {
2706
2872
  drawnTypes: ['All tools', 'Point', 'LineString', 'Polygon', 'None'],
2707
2873
  annotatedType: 'Anyone',
2708
2874
  annotatedTypes: ['Anyone', 'Me', 'Others'],
2875
+ imageRadio: false,
2876
+ imageType: 'Image',
2877
+ imageTypes: ['Image', 'Segmentation', 'Scaffold', 'Plot'],
2709
2878
  openMapRef: undefined,
2710
2879
  backgroundIconRef: undefined,
2711
2880
  toolbarOptions: [
@@ -2743,11 +2912,12 @@ export default {
2743
2912
  with: true,
2744
2913
  without: true,
2745
2914
  }
2746
- })
2915
+ }),
2747
2916
  }
2748
2917
  },
2749
2918
  computed: {
2750
2919
  ...mapState(useMainStore, ['userToken']),
2920
+ ...mapStores(useSettingsStore),
2751
2921
  isValidDrawnCreated: function () {
2752
2922
  return Object.keys(this.drawnCreatedEvent).length > 0
2753
2923
  },
@@ -3251,6 +3421,10 @@ export default {
3251
3421
  }
3252
3422
  }
3253
3423
 
3424
+ .icon-button-container {
3425
+ display: inline-block;
3426
+ }
3427
+
3254
3428
  .icon-button {
3255
3429
  height: 24px !important;
3256
3430
  width: 24px !important;
@@ -3585,7 +3759,12 @@ export default {
3585
3759
  background-color: var(--white);
3586
3760
  font-weight: 500;
3587
3761
  color: rgb(48, 49, 51);
3588
- width: 150px!important;
3762
+ &.annotationSelector {
3763
+ width: 150px!important;
3764
+ }
3765
+ &.imageSelector {
3766
+ width: 125px!important;
3767
+ }
3589
3768
  }
3590
3769
 
3591
3770
  :deep(.flatmap_dropdown) {