@abi-software/flatmapvuer 1.6.2-beta.3 → 1.6.2
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 +9568 -9628
- package/dist/flatmapvuer.umd.cjs +92 -92
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/src/components/FlatmapVuer.vue +29 -73
- package/src/components/MultiFlatmapVuer.vue +2 -34
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abi-software/flatmapvuer",
|
|
3
|
-
"version": "1.6.2
|
|
3
|
+
"version": "1.6.2",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist/*",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"./src/*": "./src/*"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@abi-software/flatmap-viewer": "^3.2.
|
|
46
|
+
"@abi-software/flatmap-viewer": "^3.2.10",
|
|
47
47
|
"@abi-software/map-utilities": "^1.2.1",
|
|
48
48
|
"@abi-software/sparc-annotation": "0.3.2",
|
|
49
49
|
"@abi-software/svg-sprite": "^1.0.1",
|
|
@@ -260,7 +260,7 @@ Please use `const` to assign meaningful names to them...
|
|
|
260
260
|
<div
|
|
261
261
|
class="pathway-location"
|
|
262
262
|
:class="{ open: drawerOpen, close: !drawerOpen }"
|
|
263
|
-
v-show="!disableUI
|
|
263
|
+
v-show="!disableUI"
|
|
264
264
|
>
|
|
265
265
|
<div
|
|
266
266
|
class="pathway-container"
|
|
@@ -270,27 +270,27 @@ Please use `const` to assign meaningful names to them...
|
|
|
270
270
|
>
|
|
271
271
|
<svg-legends v-if="!isFC" class="svg-legends-container" />
|
|
272
272
|
<template v-if="showStarInLegend">
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
273
|
+
<el-popover
|
|
274
|
+
content="Location of the featured dataset"
|
|
275
|
+
placement="right"
|
|
276
|
+
:teleported="true"
|
|
277
|
+
trigger="manual"
|
|
278
|
+
width="max-content"
|
|
279
|
+
:offset="-10"
|
|
280
|
+
popper-class="flatmap-popper flatmap-teleport-popper"
|
|
281
|
+
:visible="hoverVisibilities[9].value"
|
|
282
|
+
ref="featuredMarkerPopover"
|
|
283
|
+
>
|
|
284
|
+
<template #reference>
|
|
285
|
+
<div
|
|
286
|
+
v-popover:featuredMarkerPopover
|
|
287
|
+
class="yellow-star-legend"
|
|
288
|
+
v-html="yellowstar"
|
|
289
|
+
@mouseover="showTooltip(9)"
|
|
290
|
+
@mouseout="hideTooltip(9)"
|
|
291
|
+
></div>
|
|
292
|
+
</template>
|
|
293
|
+
</el-popover>
|
|
294
294
|
</template>
|
|
295
295
|
<!-- The line below places the yellowstar svg on the left, and the text "Featured markers on the right" with css so they are both centered in the div -->
|
|
296
296
|
<el-popover
|
|
@@ -1835,7 +1835,7 @@ export default {
|
|
|
1835
1835
|
}
|
|
1836
1836
|
|
|
1837
1837
|
// highlight all available features
|
|
1838
|
-
this.mapImp.
|
|
1838
|
+
this.mapImp.zoomToFeatures(featuresToHighlight, { noZoomIn: true });
|
|
1839
1839
|
}
|
|
1840
1840
|
},
|
|
1841
1841
|
emitConnectivityGraphError: function (errorData) {
|
|
@@ -2042,11 +2042,7 @@ export default {
|
|
|
2042
2042
|
isPathwayContainer(parentElement) ||
|
|
2043
2043
|
isPathwayContainer(nextElementSibling)
|
|
2044
2044
|
) {
|
|
2045
|
-
|
|
2046
|
-
this.drawerOpen = true;
|
|
2047
|
-
} else {
|
|
2048
|
-
this.helpModeActiveIndex += 1;
|
|
2049
|
-
}
|
|
2045
|
+
this.drawerOpen = true;
|
|
2050
2046
|
}
|
|
2051
2047
|
} else {
|
|
2052
2048
|
// skip the unavailable tooltips
|
|
@@ -2487,7 +2483,7 @@ export default {
|
|
|
2487
2483
|
}
|
|
2488
2484
|
}
|
|
2489
2485
|
|
|
2490
|
-
let promise1 = this.
|
|
2486
|
+
let promise1 = this.mapManager.loadMap(
|
|
2491
2487
|
identifier,
|
|
2492
2488
|
this.$refs.display,
|
|
2493
2489
|
this.eventCallback(),
|
|
@@ -2572,6 +2568,7 @@ export default {
|
|
|
2572
2568
|
this.addResizeButtonToMinimap()
|
|
2573
2569
|
this.loading = false
|
|
2574
2570
|
this.computePathControlsMaximumHeight()
|
|
2571
|
+
this.drawerOpen = true;
|
|
2575
2572
|
this.mapResize()
|
|
2576
2573
|
this.handleMapClick();
|
|
2577
2574
|
this.setInitMapState();
|
|
@@ -2834,14 +2831,6 @@ export default {
|
|
|
2834
2831
|
type: Object,
|
|
2835
2832
|
default: undefined,
|
|
2836
2833
|
},
|
|
2837
|
-
/**
|
|
2838
|
-
* Flatmap's Map Manager to use as single Map Manager
|
|
2839
|
-
* if the FlatmapVuer is loaded from MultiFlatmapVuer.
|
|
2840
|
-
*/
|
|
2841
|
-
mapManager: {
|
|
2842
|
-
type: Object,
|
|
2843
|
-
default: undefined,
|
|
2844
|
-
},
|
|
2845
2834
|
/**
|
|
2846
2835
|
* Specify the endpoint of the flatmap server.
|
|
2847
2836
|
*/
|
|
@@ -2889,7 +2878,7 @@ export default {
|
|
|
2889
2878
|
data: function () {
|
|
2890
2879
|
return {
|
|
2891
2880
|
sensor: null,
|
|
2892
|
-
|
|
2881
|
+
mapManager: undefined,
|
|
2893
2882
|
flatmapQueries: undefined,
|
|
2894
2883
|
annotationEntry: {},
|
|
2895
2884
|
//tooltip display has to be set to false until it is rendered
|
|
@@ -3009,27 +2998,6 @@ export default {
|
|
|
3009
2998
|
isValidDrawnCreated: function () {
|
|
3010
2999
|
return Object.keys(this.drawnCreatedEvent).length > 0
|
|
3011
3000
|
},
|
|
3012
|
-
requiresDrawer: function() {
|
|
3013
|
-
if (this.loading) {
|
|
3014
|
-
this.drawerOpen = false
|
|
3015
|
-
return false
|
|
3016
|
-
}
|
|
3017
|
-
if (!this.isFC) {
|
|
3018
|
-
this.drawerOpen = true
|
|
3019
|
-
return true
|
|
3020
|
-
} else {
|
|
3021
|
-
if ((this.systems?.length > 0) ||
|
|
3022
|
-
(this.containsAlert && this.alertOptions) ||
|
|
3023
|
-
(this.pathways?.length > 0) ||
|
|
3024
|
-
(this.taxonConnectivity?.length > 0)
|
|
3025
|
-
) {
|
|
3026
|
-
this.drawerOpen = true
|
|
3027
|
-
return true
|
|
3028
|
-
}
|
|
3029
|
-
}
|
|
3030
|
-
this.drawerOpen = false
|
|
3031
|
-
return true
|
|
3032
|
-
}
|
|
3033
3001
|
},
|
|
3034
3002
|
watch: {
|
|
3035
3003
|
entry: function () {
|
|
@@ -3051,7 +3019,7 @@ export default {
|
|
|
3051
3019
|
state: {
|
|
3052
3020
|
handler: function (state, oldVal) {
|
|
3053
3021
|
if (state !== oldVal) {
|
|
3054
|
-
if (this.
|
|
3022
|
+
if (this.mapManager) {
|
|
3055
3023
|
this.setState(state)
|
|
3056
3024
|
} else {
|
|
3057
3025
|
//this component has not been mounted yet
|
|
@@ -3120,22 +3088,11 @@ export default {
|
|
|
3120
3088
|
}
|
|
3121
3089
|
}
|
|
3122
3090
|
},
|
|
3123
|
-
created: function () {
|
|
3124
|
-
if (this.mapManager) {
|
|
3125
|
-
this.mapManagerRef = this.mapManager;
|
|
3126
|
-
} else {
|
|
3127
|
-
this.mapManagerRef = markRaw(new flatmap.MapManager(this.flatmapAPI));
|
|
3128
|
-
/**
|
|
3129
|
-
* The event emitted after a new mapManager is loaded.
|
|
3130
|
-
* This mapManager can be used to create new flatmaps.
|
|
3131
|
-
*/
|
|
3132
|
-
this.$emit('mapmanager-loaded', this.mapManagerRef);
|
|
3133
|
-
}
|
|
3134
|
-
},
|
|
3135
3091
|
mounted: function () {
|
|
3136
3092
|
this.openMapRef = shallowRef(this.$refs.openMapRef)
|
|
3137
3093
|
this.backgroundIconRef = shallowRef(this.$refs.backgroundIconRef)
|
|
3138
3094
|
this.tooltipWait.length = this.hoverVisibilities.length
|
|
3095
|
+
this.mapManager = markRaw(new flatmap.MapManager(this.flatmapAPI))
|
|
3139
3096
|
this.flatmapQueries = markRaw(new FlatmapQueries())
|
|
3140
3097
|
this.flatmapQueries.initialise(this.flatmapAPI)
|
|
3141
3098
|
if (this.state) {
|
|
@@ -3232,7 +3189,6 @@ export default {
|
|
|
3232
3189
|
|
|
3233
3190
|
.svg-legends-container {
|
|
3234
3191
|
width: 70%;
|
|
3235
|
-
min-width:183px;
|
|
3236
3192
|
height: auto;
|
|
3237
3193
|
position: relative;
|
|
3238
3194
|
max-height: 140px;
|
|
@@ -83,7 +83,6 @@
|
|
|
83
83
|
:displayMinimap="displayMinimap"
|
|
84
84
|
:showStarInLegend="showStarInLegend"
|
|
85
85
|
style="height: 100%"
|
|
86
|
-
:mapManager="mapManagerRef"
|
|
87
86
|
:flatmapAPI="flatmapAPI"
|
|
88
87
|
:sparcAPI="sparcAPI"
|
|
89
88
|
/>
|
|
@@ -125,9 +124,6 @@ export default {
|
|
|
125
124
|
Popover,
|
|
126
125
|
FlatmapVuer,
|
|
127
126
|
},
|
|
128
|
-
created: function () {
|
|
129
|
-
this.loadMapManager();
|
|
130
|
-
},
|
|
131
127
|
mounted: function () {
|
|
132
128
|
this.initialise()
|
|
133
129
|
EventBus.on('onActionClick', (action) => {
|
|
@@ -223,23 +219,6 @@ export default {
|
|
|
223
219
|
}
|
|
224
220
|
})
|
|
225
221
|
},
|
|
226
|
-
/**
|
|
227
|
-
* Function to load `mapManager` to create flatmap.
|
|
228
|
-
*/
|
|
229
|
-
loadMapManager: function () {
|
|
230
|
-
if (!this.mapManagerRef) {
|
|
231
|
-
if (this.mapManager) {
|
|
232
|
-
this.mapManagerRef = this.mapManager;
|
|
233
|
-
} else {
|
|
234
|
-
this.mapManagerRef = markRaw(new flatmap.MapManager(this.flatmapAPI));
|
|
235
|
-
/**
|
|
236
|
-
* The event emitted after a new mapManager is loaded.
|
|
237
|
-
* This mapManager can be used to create new flatmaps.
|
|
238
|
-
*/
|
|
239
|
-
this.$emit('mapmanager-loaded', this.mapManagerRef);
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
},
|
|
243
222
|
/**
|
|
244
223
|
* @public
|
|
245
224
|
* Function to emit ``resource-selected`` event with provided ``resource``.
|
|
@@ -431,11 +410,12 @@ export default {
|
|
|
431
410
|
//uuid is in the state but should be checked if it is the latest map
|
|
432
411
|
//for that taxon
|
|
433
412
|
return new Promise(() => {
|
|
413
|
+
const mapManager = new flatmap.MapManager(this.flatmapAPI)
|
|
434
414
|
//mapManager.findMap_ is an async function so we need to wrap this with a promise
|
|
435
415
|
const identifier = { taxon: mapState.entry }
|
|
436
416
|
if (mapState.biologicalSex)
|
|
437
417
|
identifier['biologicalSex'] = mapState.biologicalSex
|
|
438
|
-
|
|
418
|
+
mapManager
|
|
439
419
|
.findMap_(identifier)
|
|
440
420
|
.then((map) => {
|
|
441
421
|
if (map.uuid !== mapState.uuid) {
|
|
@@ -481,9 +461,6 @@ export default {
|
|
|
481
461
|
*/
|
|
482
462
|
setState: function (state) {
|
|
483
463
|
if (state) {
|
|
484
|
-
// Update undefined mapManagerRef for setState happens before created event
|
|
485
|
-
this.loadMapManager();
|
|
486
|
-
|
|
487
464
|
//Update state if required
|
|
488
465
|
this.updateState(state).then((currentState) => {
|
|
489
466
|
this.initialise().then(() => {
|
|
@@ -719,14 +696,6 @@ export default {
|
|
|
719
696
|
type: Object,
|
|
720
697
|
default: undefined,
|
|
721
698
|
},
|
|
722
|
-
/**
|
|
723
|
-
* Flatmap's Map Manager to use as single Map Manager
|
|
724
|
-
* when the value is provided.
|
|
725
|
-
*/
|
|
726
|
-
mapManager: {
|
|
727
|
-
type: Object,
|
|
728
|
-
default: undefined,
|
|
729
|
-
},
|
|
730
699
|
/**
|
|
731
700
|
* Specify the endpoint of the flatmap server.
|
|
732
701
|
*/
|
|
@@ -770,7 +739,6 @@ export default {
|
|
|
770
739
|
requireInitialisation: true,
|
|
771
740
|
resolveList: markRaw([]),
|
|
772
741
|
initialised: false,
|
|
773
|
-
mapManagerRef: undefined,
|
|
774
742
|
}
|
|
775
743
|
},
|
|
776
744
|
watch: {
|