@abi-software/flatmapvuer 1.4.2 → 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/dist/flatmapvuer.js +21922 -21447
- package/dist/flatmapvuer.umd.cjs +108 -102
- package/dist/style.css +1 -1
- package/package.json +8 -5
- package/src/App.vue +13 -1
- package/src/components/FlatmapVuer.vue +191 -36
- package/src/components/MultiFlatmapVuer.vue +17 -1
- package/src/main.js +1 -1
- package/src/mixins/imageMixin.js +116 -0
- package/src/services/scicrunchQueries.js +280 -0
- package/src/stores/settings.js +46 -0
- /package/src/{store → stores}/index.js +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abi-software/flatmapvuer",
|
|
3
|
-
"version": "1.4.
|
|
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.
|
|
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.
|
|
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) {
|
|
@@ -438,7 +438,7 @@ Please use `const` to assign meaningful names to them...
|
|
|
438
438
|
ref="backgroundPopover"
|
|
439
439
|
:virtual-ref="backgroundIconRef"
|
|
440
440
|
placement="top-start"
|
|
441
|
-
width="
|
|
441
|
+
width="330"
|
|
442
442
|
:teleported="false"
|
|
443
443
|
trigger="click"
|
|
444
444
|
popper-class="background-popper h-auto"
|
|
@@ -465,13 +465,14 @@ Please use `const` to assign meaningful names to them...
|
|
|
465
465
|
</el-row>
|
|
466
466
|
</el-row>
|
|
467
467
|
<template v-if="viewingMode === 'Annotation' && userInformation">
|
|
468
|
+
<el-row class="backgroundSpacer"></el-row>
|
|
468
469
|
<el-row class="backgroundText">Drawn By*</el-row>
|
|
469
470
|
<el-row class="backgroundControl">
|
|
470
471
|
<el-select
|
|
471
472
|
:teleported="false"
|
|
472
473
|
v-model="drawnType"
|
|
473
474
|
placeholder="Select"
|
|
474
|
-
class="select-box"
|
|
475
|
+
class="select-box annotationSelector"
|
|
475
476
|
popper-class="flatmap_dropdown"
|
|
476
477
|
@change="setDrawnType"
|
|
477
478
|
>
|
|
@@ -487,13 +488,14 @@ Please use `const` to assign meaningful names to them...
|
|
|
487
488
|
</el-option>
|
|
488
489
|
</el-select>
|
|
489
490
|
</el-row>
|
|
491
|
+
<el-row class="backgroundSpacer"></el-row>
|
|
490
492
|
<el-row class="backgroundText">Annotated By*</el-row>
|
|
491
493
|
<el-row class="backgroundControl">
|
|
492
494
|
<el-select
|
|
493
495
|
:teleported="false"
|
|
494
496
|
v-model="annotatedType"
|
|
495
497
|
placeholder="Select"
|
|
496
|
-
class="select-box"
|
|
498
|
+
class="select-box annotationSelector"
|
|
497
499
|
popper-class="flatmap_dropdown"
|
|
498
500
|
@change="setAnnotatedType"
|
|
499
501
|
>
|
|
@@ -510,18 +512,59 @@ Please use `const` to assign meaningful names to them...
|
|
|
510
512
|
</el-select>
|
|
511
513
|
</el-row>
|
|
512
514
|
</template>
|
|
513
|
-
<
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
<el-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
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>
|
|
525
568
|
<el-row class="backgroundSpacer"></el-row>
|
|
526
569
|
<el-row class="backgroundText">Organs display</el-row>
|
|
527
570
|
<el-row class="backgroundControl">
|
|
@@ -622,9 +665,10 @@ Please use `const` to assign meaningful names to them...
|
|
|
622
665
|
ref="tooltip"
|
|
623
666
|
class="tooltip"
|
|
624
667
|
v-show="tooltipDisplay"
|
|
668
|
+
:tooltipType="tooltipType"
|
|
669
|
+
:provenanceEntry="provenanceEntry"
|
|
625
670
|
:annotationEntry="annotationEntry"
|
|
626
|
-
:
|
|
627
|
-
:annotationDisplay="viewingMode === 'Annotation'"
|
|
671
|
+
:imageEntry="imageEntry"
|
|
628
672
|
@annotation="commitAnnotationEvent"
|
|
629
673
|
/>
|
|
630
674
|
</div>
|
|
@@ -663,10 +707,18 @@ import yellowstar from '../icons/yellowstar'
|
|
|
663
707
|
import ResizeSensor from 'css-element-queries/src/ResizeSensor'
|
|
664
708
|
import * as flatmap from '@abi-software/flatmap-viewer'
|
|
665
709
|
import { AnnotationService } from '@abi-software/sparc-annotation'
|
|
666
|
-
import { mapState } from 'pinia'
|
|
667
|
-
import { useMainStore } from '@/
|
|
710
|
+
import { mapState, mapStores } from 'pinia'
|
|
711
|
+
import { useMainStore } from '@/stores/index'
|
|
712
|
+
import { useSettingsStore } from '@/stores/settings'
|
|
668
713
|
import { DrawToolbar, Tooltip, TreeControls } from '@abi-software/map-utilities'
|
|
669
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'
|
|
670
722
|
|
|
671
723
|
const centroid = (geometry) => {
|
|
672
724
|
let featureGeometry = { lng: 0, lat: 0, }
|
|
@@ -755,6 +807,7 @@ const createUnfilledTooltipData = function () {
|
|
|
755
807
|
*/
|
|
756
808
|
export default {
|
|
757
809
|
name: 'FlatmapVuer',
|
|
810
|
+
mixins:[imageMixin],
|
|
758
811
|
components: {
|
|
759
812
|
Button,
|
|
760
813
|
Col,
|
|
@@ -787,6 +840,71 @@ export default {
|
|
|
787
840
|
return { annotator }
|
|
788
841
|
},
|
|
789
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
|
+
},
|
|
790
908
|
/**
|
|
791
909
|
* @vuese
|
|
792
910
|
* Function to initialise drawing.
|
|
@@ -1514,7 +1632,7 @@ export default {
|
|
|
1514
1632
|
this.mapImp.zoomToGeoJSONFeatures(gid, {noZoomIn: true})
|
|
1515
1633
|
} else {
|
|
1516
1634
|
// reset visibility of paths
|
|
1517
|
-
this.mapImp.
|
|
1635
|
+
this.mapImp.unselectGeoJSONFeatures()
|
|
1518
1636
|
payload.selections.forEach((item) => {
|
|
1519
1637
|
let show = payload.checked.includes(item.taxon)
|
|
1520
1638
|
this.mapImp.enableConnectivityByTaxonIds(item.taxon, show)
|
|
@@ -1655,6 +1773,7 @@ export default {
|
|
|
1655
1773
|
userData: args,
|
|
1656
1774
|
eventType: eventType,
|
|
1657
1775
|
provenanceTaxonomy: taxons,
|
|
1776
|
+
markerType: this.imageRadio ? this.imageType : "Standard",
|
|
1658
1777
|
}
|
|
1659
1778
|
if (eventType === 'click') {
|
|
1660
1779
|
this.featuresAlert = data.alert
|
|
@@ -1689,7 +1808,6 @@ export default {
|
|
|
1689
1808
|
}
|
|
1690
1809
|
if (
|
|
1691
1810
|
data &&
|
|
1692
|
-
data.type !== 'marker' &&
|
|
1693
1811
|
eventType === 'click' &&
|
|
1694
1812
|
!(this.viewingMode === 'Neuron Connection') &&
|
|
1695
1813
|
// Disable popup when drawing
|
|
@@ -1723,6 +1841,16 @@ export default {
|
|
|
1723
1841
|
* @arg data
|
|
1724
1842
|
*/
|
|
1725
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 {
|
|
1726
1854
|
// Call flatmap database to get the connection data
|
|
1727
1855
|
if (this.viewingMode === 'Annotation') {
|
|
1728
1856
|
if (data.feature) {
|
|
@@ -1730,6 +1858,7 @@ export default {
|
|
|
1730
1858
|
...data.feature,
|
|
1731
1859
|
resourceId: this.serverURL,
|
|
1732
1860
|
}
|
|
1861
|
+
this.tooltipType = 'annotation'
|
|
1733
1862
|
if (data.feature.featureId && data.feature.models) {
|
|
1734
1863
|
this.displayTooltip(data.feature.models)
|
|
1735
1864
|
} else if (data.feature.feature) {
|
|
@@ -1763,9 +1892,11 @@ export default {
|
|
|
1763
1892
|
results[1] ||
|
|
1764
1893
|
(data.feature.hyperlinks && data.feature.hyperlinks.length > 0)
|
|
1765
1894
|
) {
|
|
1895
|
+
this.tooltipType = 'provenance'
|
|
1766
1896
|
this.resourceForTooltip = data.resource[0]
|
|
1767
1897
|
data.resourceForTooltip = this.resourceForTooltip
|
|
1768
1898
|
this.createTooltipFromNeuronCuration(data)
|
|
1899
|
+
}
|
|
1769
1900
|
}
|
|
1770
1901
|
}
|
|
1771
1902
|
},
|
|
@@ -1804,7 +1935,7 @@ export default {
|
|
|
1804
1935
|
* @arg data
|
|
1805
1936
|
*/
|
|
1806
1937
|
createTooltipFromNeuronCuration: async function (data) {
|
|
1807
|
-
this.
|
|
1938
|
+
this.provenanceEntry = await this.flatmapQueries.createTooltipData(data)
|
|
1808
1939
|
this.displayTooltip(data.resource[0])
|
|
1809
1940
|
},
|
|
1810
1941
|
/**
|
|
@@ -2005,7 +2136,7 @@ export default {
|
|
|
2005
2136
|
options.annotationFeatureGeometry = geometry
|
|
2006
2137
|
} else {
|
|
2007
2138
|
featureId = this.mapImp.modelFeatureIds(feature)[0]
|
|
2008
|
-
if (!this.activeDrawTool) {
|
|
2139
|
+
if (!this.activeDrawTool && !this.imageEntry.length) {
|
|
2009
2140
|
options.positionAtLastClick = true
|
|
2010
2141
|
}
|
|
2011
2142
|
}
|
|
@@ -2017,9 +2148,12 @@ export default {
|
|
|
2017
2148
|
// const featureIds = [feature];
|
|
2018
2149
|
// this.moveMap(featureIds);
|
|
2019
2150
|
if (this.featuresAlert) {
|
|
2020
|
-
this.
|
|
2151
|
+
this.provenanceEntry['featuresAlert'] = this.featuresAlert;
|
|
2021
2152
|
}
|
|
2022
|
-
this.$emit('connectivity-info-open', this.
|
|
2153
|
+
this.$emit('connectivity-info-open', this.provenanceEntry);
|
|
2154
|
+
}
|
|
2155
|
+
if (this.imageThumbnailSidebar && this.viewingMode === 'Exploration') {
|
|
2156
|
+
this.$emit('image-thumbnail-open', this.imageEntry)
|
|
2023
2157
|
}
|
|
2024
2158
|
// If UI is not disabled,
|
|
2025
2159
|
// And connectivityInfoSidebar is not set (default) or set to `false`
|
|
@@ -2030,8 +2164,10 @@ export default {
|
|
|
2030
2164
|
this.viewingMode === 'Annotation' ||
|
|
2031
2165
|
(
|
|
2032
2166
|
this.viewingMode === 'Exploration' &&
|
|
2033
|
-
|
|
2034
|
-
|
|
2167
|
+
(
|
|
2168
|
+
(!this.connectivityInfoSidebar && this.hasTooltipEntry()) ||
|
|
2169
|
+
(!this.imageThumbnailSidebar && this.imageEntry.length)
|
|
2170
|
+
)
|
|
2035
2171
|
)
|
|
2036
2172
|
)
|
|
2037
2173
|
) {
|
|
@@ -2050,7 +2186,7 @@ export default {
|
|
|
2050
2186
|
origins,
|
|
2051
2187
|
provenanceTaxonomy,
|
|
2052
2188
|
provenanceTaxonomyLabel
|
|
2053
|
-
} = this.
|
|
2189
|
+
} = this.provenanceEntry;
|
|
2054
2190
|
|
|
2055
2191
|
return Boolean(
|
|
2056
2192
|
components?.length ||
|
|
@@ -2356,7 +2492,7 @@ export default {
|
|
|
2356
2492
|
this.computePathControlsMaximumHeight()
|
|
2357
2493
|
this.drawerOpen = !this.isCentreLine
|
|
2358
2494
|
this.mapResize()
|
|
2359
|
-
this.handleMapClick()
|
|
2495
|
+
this.handleMapClick()
|
|
2360
2496
|
/**
|
|
2361
2497
|
* This is ``onFlatmapReady`` event.
|
|
2362
2498
|
* @arg ``this`` (Component Vue Instance)
|
|
@@ -2373,7 +2509,8 @@ export default {
|
|
|
2373
2509
|
|
|
2374
2510
|
if (_map) {
|
|
2375
2511
|
_map.on('click', (e) => {
|
|
2376
|
-
|
|
2512
|
+
// Tmeporary add imageEntry length
|
|
2513
|
+
if (this.provenanceEntry.featureId || this.imageEntry.length) {
|
|
2377
2514
|
this.$emit('connectivity-info-close');
|
|
2378
2515
|
}
|
|
2379
2516
|
});
|
|
@@ -2620,12 +2757,12 @@ export default {
|
|
|
2620
2757
|
*/
|
|
2621
2758
|
sparcAPI: {
|
|
2622
2759
|
type: String,
|
|
2623
|
-
default: '
|
|
2760
|
+
default: '',
|
|
2624
2761
|
},
|
|
2625
2762
|
/**
|
|
2626
2763
|
* Flag to disable UIs on Map
|
|
2627
2764
|
*/
|
|
2628
|
-
|
|
2765
|
+
disableUI: {
|
|
2629
2766
|
type: Boolean,
|
|
2630
2767
|
default: false,
|
|
2631
2768
|
},
|
|
@@ -2636,11 +2773,17 @@ export default {
|
|
|
2636
2773
|
type: Boolean,
|
|
2637
2774
|
default: false,
|
|
2638
2775
|
},
|
|
2776
|
+
/**
|
|
2777
|
+
* The option to show image thumbnail in sidebar
|
|
2778
|
+
*/
|
|
2779
|
+
imageThumbnailSidebar: {
|
|
2780
|
+
type: Boolean,
|
|
2781
|
+
default: false,
|
|
2782
|
+
},
|
|
2639
2783
|
},
|
|
2640
2784
|
provide() {
|
|
2641
2785
|
return {
|
|
2642
2786
|
flatmapAPI: this.flatmapAPI,
|
|
2643
|
-
sparcAPI: this.sparcAPI,
|
|
2644
2787
|
$annotator: this.annotator,
|
|
2645
2788
|
getFeaturesAlert: () => this.featuresAlert,
|
|
2646
2789
|
userApiKey: this.userToken,
|
|
@@ -2659,6 +2802,8 @@ export default {
|
|
|
2659
2802
|
serverURL: undefined,
|
|
2660
2803
|
layers: [],
|
|
2661
2804
|
pathways: [],
|
|
2805
|
+
imageEntry: markRaw([]),
|
|
2806
|
+
tooltipType: 'provenance',
|
|
2662
2807
|
sckanDisplay: [
|
|
2663
2808
|
{
|
|
2664
2809
|
label: 'Display Path with SCKAN',
|
|
@@ -2702,8 +2847,9 @@ export default {
|
|
|
2702
2847
|
currentBackground: 'white',
|
|
2703
2848
|
availableBackground: ['white', 'lightskyblue', 'black'],
|
|
2704
2849
|
loading: false,
|
|
2850
|
+
imagesDownloading: false,
|
|
2705
2851
|
flatmapMarker: flatmapMarker,
|
|
2706
|
-
|
|
2852
|
+
provenanceEntry: createUnfilledTooltipData(),
|
|
2707
2853
|
connectivityTooltipVisible: false,
|
|
2708
2854
|
drawerOpen: false,
|
|
2709
2855
|
featuresAlert: undefined,
|
|
@@ -2726,6 +2872,9 @@ export default {
|
|
|
2726
2872
|
drawnTypes: ['All tools', 'Point', 'LineString', 'Polygon', 'None'],
|
|
2727
2873
|
annotatedType: 'Anyone',
|
|
2728
2874
|
annotatedTypes: ['Anyone', 'Me', 'Others'],
|
|
2875
|
+
imageRadio: false,
|
|
2876
|
+
imageType: 'Image',
|
|
2877
|
+
imageTypes: ['Image', 'Segmentation', 'Scaffold', 'Plot'],
|
|
2729
2878
|
openMapRef: undefined,
|
|
2730
2879
|
backgroundIconRef: undefined,
|
|
2731
2880
|
toolbarOptions: [
|
|
@@ -2763,11 +2912,12 @@ export default {
|
|
|
2763
2912
|
with: true,
|
|
2764
2913
|
without: true,
|
|
2765
2914
|
}
|
|
2766
|
-
})
|
|
2915
|
+
}),
|
|
2767
2916
|
}
|
|
2768
2917
|
},
|
|
2769
2918
|
computed: {
|
|
2770
2919
|
...mapState(useMainStore, ['userToken']),
|
|
2920
|
+
...mapStores(useSettingsStore),
|
|
2771
2921
|
isValidDrawnCreated: function () {
|
|
2772
2922
|
return Object.keys(this.drawnCreatedEvent).length > 0
|
|
2773
2923
|
},
|
|
@@ -3609,7 +3759,12 @@ export default {
|
|
|
3609
3759
|
background-color: var(--white);
|
|
3610
3760
|
font-weight: 500;
|
|
3611
3761
|
color: rgb(48, 49, 51);
|
|
3612
|
-
|
|
3762
|
+
&.annotationSelector {
|
|
3763
|
+
width: 150px!important;
|
|
3764
|
+
}
|
|
3765
|
+
&.imageSelector {
|
|
3766
|
+
width: 125px!important;
|
|
3767
|
+
}
|
|
3613
3768
|
}
|
|
3614
3769
|
|
|
3615
3770
|
:deep(.flatmap_dropdown) {
|
|
@@ -81,6 +81,9 @@
|
|
|
81
81
|
style="height: 100%"
|
|
82
82
|
:flatmapAPI="flatmapAPI"
|
|
83
83
|
:sparcAPI="sparcAPI"
|
|
84
|
+
@imageThumbnailDisplay="onImageThumbnailDisplay"
|
|
85
|
+
:imageThumbnailSidebar="imageThumbnailSidebar"
|
|
86
|
+
@image-thumbnail-open="onImageThumbnailOpen"
|
|
84
87
|
/>
|
|
85
88
|
</div>
|
|
86
89
|
</template>
|
|
@@ -264,6 +267,12 @@ export default {
|
|
|
264
267
|
onConnectivityInfoOpen: function (entryData) {
|
|
265
268
|
this.$emit('connectivity-info-open', entryData);
|
|
266
269
|
},
|
|
270
|
+
onImageThumbnailDisplay: function (payload) {
|
|
271
|
+
this.$emit('imageThumbnailDisplay', payload);
|
|
272
|
+
},
|
|
273
|
+
onImageThumbnailOpen: function (payload) {
|
|
274
|
+
this.$emit('image-thumbnail-open', payload);
|
|
275
|
+
},
|
|
267
276
|
onSelectionsDataChanged: function (data) {
|
|
268
277
|
this.$emit('pathway-selection-changed', data);
|
|
269
278
|
},
|
|
@@ -700,7 +709,7 @@ export default {
|
|
|
700
709
|
*/
|
|
701
710
|
sparcAPI: {
|
|
702
711
|
type: String,
|
|
703
|
-
default: '
|
|
712
|
+
default: '',
|
|
704
713
|
},
|
|
705
714
|
/**
|
|
706
715
|
* Flag to disable UIs on Map
|
|
@@ -716,6 +725,13 @@ export default {
|
|
|
716
725
|
type: Boolean,
|
|
717
726
|
default: false,
|
|
718
727
|
},
|
|
728
|
+
/**
|
|
729
|
+
* The option to show image thumbnail in sidebar
|
|
730
|
+
*/
|
|
731
|
+
imageThumbnailSidebar: {
|
|
732
|
+
type: Boolean,
|
|
733
|
+
default: false,
|
|
734
|
+
},
|
|
719
735
|
},
|
|
720
736
|
data: function () {
|
|
721
737
|
return {
|
package/src/main.js
CHANGED