@abi-software/flatmapvuer 1.3.2 → 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/dist/flatmapvuer.js +1136 -1142
- package/dist/flatmapvuer.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/src/App.vue +1 -0
- package/src/components/FlatmapVuer.vue +27 -38
- package/src/components/MultiFlatmapVuer.vue +20 -16
- package/src/components.d.ts +0 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abi-software/flatmapvuer",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist/*",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@abi-software/flatmap-viewer": "2.9.5",
|
|
47
|
-
"@abi-software/map-utilities": "1.
|
|
47
|
+
"@abi-software/map-utilities": "1.1.0",
|
|
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",
|
package/src/App.vue
CHANGED
|
@@ -150,6 +150,7 @@ export default {
|
|
|
150
150
|
//component.showPathwaysDrawer(false);
|
|
151
151
|
if (this.consoleOn) console.log(taxon, id)
|
|
152
152
|
//component.searchAndShowResult("heart");
|
|
153
|
+
// component.changeViewingMode('Annotation')
|
|
153
154
|
},
|
|
154
155
|
panZoomcallback: function (payload) {
|
|
155
156
|
this.payload = payload
|
|
@@ -54,7 +54,7 @@ Please use `const` to assign meaningful names to them...
|
|
|
54
54
|
SCKAN </a
|
|
55
55
|
>.
|
|
56
56
|
</p>
|
|
57
|
-
<p v-else @mouseover="showTooltip(
|
|
57
|
+
<p v-else @mouseover="showTooltip(7)" @mouseout="hideTooltip(7)">
|
|
58
58
|
This map displays the connectivity of neuron populations.
|
|
59
59
|
Specifically, those from the primarily rat-based
|
|
60
60
|
<a
|
|
@@ -76,8 +76,8 @@ Please use `const` to assign meaningful names to them...
|
|
|
76
76
|
<div
|
|
77
77
|
class="warning-icon"
|
|
78
78
|
v-if="displayWarning"
|
|
79
|
-
@mouseover="showTooltip(
|
|
80
|
-
@mouseout="hideTooltip(
|
|
79
|
+
@mouseover="showTooltip(7)"
|
|
80
|
+
@mouseout="hideTooltip(7)"
|
|
81
81
|
>
|
|
82
82
|
<el-icon><el-icon-warning-filled /></el-icon>
|
|
83
83
|
<template v-if="isLegacy">
|
|
@@ -363,7 +363,7 @@ Please use `const` to assign meaningful names to them...
|
|
|
363
363
|
key="pathwaysSelection"
|
|
364
364
|
/>
|
|
365
365
|
<selections-group
|
|
366
|
-
v-if="
|
|
366
|
+
v-if="taxonConnectivity && taxonConnectivity.length > 0"
|
|
367
367
|
title="Studied in"
|
|
368
368
|
labelKey="label"
|
|
369
369
|
identifierKey="taxon"
|
|
@@ -437,19 +437,19 @@ Please use `const` to assign meaningful names to them...
|
|
|
437
437
|
<el-row class="backgroundControl">
|
|
438
438
|
<div style="margin-bottom: 2px;">
|
|
439
439
|
<template
|
|
440
|
-
v-for="(
|
|
441
|
-
:key="
|
|
440
|
+
v-for="(value, key, index) in viewingModes"
|
|
441
|
+
:key="key"
|
|
442
442
|
>
|
|
443
|
-
<template v-if="
|
|
444
|
-
<span class="viewing-mode-title"><b >{{
|
|
443
|
+
<template v-if="key === viewingMode">
|
|
444
|
+
<span class="viewing-mode-title"><b >{{ key }}</b></span>
|
|
445
445
|
</template>
|
|
446
446
|
<template v-else>
|
|
447
|
-
<span class="viewing-mode-unselected" @click="changeViewingMode(
|
|
447
|
+
<span class="viewing-mode-unselected" @click="changeViewingMode(key)">{{ key }}</span>
|
|
448
448
|
</template>
|
|
449
449
|
</template>
|
|
450
450
|
</div>
|
|
451
451
|
<el-row class="viewing-mode-description">
|
|
452
|
-
{{ viewingModes[
|
|
452
|
+
{{ viewingModes[viewingMode] }}
|
|
453
453
|
</el-row>
|
|
454
454
|
</el-row>
|
|
455
455
|
<template v-if="viewingMode === 'Annotation' && userInformation">
|
|
@@ -757,8 +757,6 @@ export default {
|
|
|
757
757
|
DrawToolbar
|
|
758
758
|
},
|
|
759
759
|
beforeCreate: function () {
|
|
760
|
-
this.mapManager = undefined
|
|
761
|
-
this.mapImp = undefined
|
|
762
760
|
//The state watcher may triggered before
|
|
763
761
|
//created causing issue, This flag will
|
|
764
762
|
//resolve this issue.
|
|
@@ -1691,13 +1689,10 @@ export default {
|
|
|
1691
1689
|
* Function triggered by viewing mode change.
|
|
1692
1690
|
* (e.g., from 'Exploration' to 'Annotation')
|
|
1693
1691
|
* All tooltips and popups currently showing on map will be closed
|
|
1694
|
-
* when this function is triggered. Optional index can be provided, this will
|
|
1695
|
-
* switch the provided view mode to the first index.
|
|
1696
1692
|
*/
|
|
1697
|
-
|
|
1698
|
-
if (
|
|
1699
|
-
|
|
1700
|
-
this.viewingModeIndex = newModeIndex
|
|
1693
|
+
changeViewingMode: function (modeName) {
|
|
1694
|
+
if (modeName) {
|
|
1695
|
+
this.viewingMode = modeName
|
|
1701
1696
|
}
|
|
1702
1697
|
this.closeTooltip()
|
|
1703
1698
|
},
|
|
@@ -2001,6 +1996,9 @@ export default {
|
|
|
2001
1996
|
// this method is moved to sidebar connectivity info
|
|
2002
1997
|
// const featureIds = [feature];
|
|
2003
1998
|
// this.moveMap(featureIds);
|
|
1999
|
+
if (this.featuresAlert) {
|
|
2000
|
+
this.tooltipEntry['featuresAlert'] = this.featuresAlert;
|
|
2001
|
+
}
|
|
2004
2002
|
this.$emit('connectivity-info-open', this.tooltipEntry);
|
|
2005
2003
|
}
|
|
2006
2004
|
// If UI is not disabled,
|
|
@@ -2315,7 +2313,7 @@ export default {
|
|
|
2315
2313
|
*/
|
|
2316
2314
|
onFlatmapReady: function () {
|
|
2317
2315
|
// onFlatmapReady is used for functions that need to run immediately after the flatmap is loaded
|
|
2318
|
-
this.sensor = new ResizeSensor(this.$refs.display, this.mapResize)
|
|
2316
|
+
this.sensor = markRaw(new ResizeSensor(this.$refs.display, this.mapResize))
|
|
2319
2317
|
if (this.mapImp.options && this.mapImp.options.style === 'functional') {
|
|
2320
2318
|
this.isFC = true
|
|
2321
2319
|
}
|
|
@@ -2625,6 +2623,9 @@ export default {
|
|
|
2625
2623
|
},
|
|
2626
2624
|
data: function () {
|
|
2627
2625
|
return {
|
|
2626
|
+
sensor: null,
|
|
2627
|
+
mapManager: undefined,
|
|
2628
|
+
flatmapQueries: undefined,
|
|
2628
2629
|
annotationEntry: {},
|
|
2629
2630
|
//tooltip display has to be set to false until it is rendered
|
|
2630
2631
|
//for the first time, otherwise it may display an arrow at a
|
|
@@ -2649,6 +2650,7 @@ export default {
|
|
|
2649
2650
|
systems: [],
|
|
2650
2651
|
taxonConnectivity: [],
|
|
2651
2652
|
pathwaysMaxHeight: 1000,
|
|
2653
|
+
tooltipWait: markRaw([]),
|
|
2652
2654
|
hoverVisibilities: [
|
|
2653
2655
|
{ value: false, ref: 'markerPopover' }, // 0
|
|
2654
2656
|
{ value: false, ref: 'zoomInPopover' }, // 1
|
|
@@ -2688,20 +2690,11 @@ export default {
|
|
|
2688
2690
|
currentActive: '',
|
|
2689
2691
|
selectedDrawnFeature: undefined, // Clicked drawn annotation
|
|
2690
2692
|
currentHover: '',
|
|
2691
|
-
|
|
2693
|
+
viewingMode: 'Exploration',
|
|
2692
2694
|
viewingModes: {
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
},
|
|
2697
|
-
1: {
|
|
2698
|
-
name: 'Neuron Connection',
|
|
2699
|
-
description: 'Discover Neuron connections by selecting a neuron and viewing its associated network connections'
|
|
2700
|
-
},
|
|
2701
|
-
2: {
|
|
2702
|
-
name: 'Annotation',
|
|
2703
|
-
description: 'View internal identifiers of features'
|
|
2704
|
-
}
|
|
2695
|
+
'Exploration': 'Find relevant research and view detail of neural pathways by selecting a pathway to view its connections and data sources',
|
|
2696
|
+
'Neuron Connection': 'Discover Neuron connections by selecting a neuron and viewing its associated network connections',
|
|
2697
|
+
'Annotation': 'View internal identifiers of features'
|
|
2705
2698
|
},
|
|
2706
2699
|
drawnType: 'All tools',
|
|
2707
2700
|
drawnTypes: ['All tools', 'Point', 'LineString', 'Polygon', 'None'],
|
|
@@ -2752,9 +2745,6 @@ export default {
|
|
|
2752
2745
|
isValidDrawnCreated: function () {
|
|
2753
2746
|
return Object.keys(this.drawnCreatedEvent).length > 0
|
|
2754
2747
|
},
|
|
2755
|
-
viewingMode: function() {
|
|
2756
|
-
return this.viewingModes[this.viewingModeIndex].name
|
|
2757
|
-
},
|
|
2758
2748
|
},
|
|
2759
2749
|
watch: {
|
|
2760
2750
|
entry: function () {
|
|
@@ -2812,10 +2802,9 @@ export default {
|
|
|
2812
2802
|
mounted: function () {
|
|
2813
2803
|
this.openMapRef = shallowRef(this.$refs.openMapRef)
|
|
2814
2804
|
this.backgroundIconRef = shallowRef(this.$refs.backgroundIconRef)
|
|
2815
|
-
this.tooltipWait = []
|
|
2816
2805
|
this.tooltipWait.length = this.hoverVisibilities.length
|
|
2817
|
-
this.mapManager = new flatmap.MapManager(this.flatmapAPI)
|
|
2818
|
-
this.flatmapQueries = new FlatmapQueries()
|
|
2806
|
+
this.mapManager = markRaw(new flatmap.MapManager(this.flatmapAPI))
|
|
2807
|
+
this.flatmapQueries = markRaw(new FlatmapQueries())
|
|
2819
2808
|
this.flatmapQueries.initialise(this.flatmapAPI)
|
|
2820
2809
|
if (this.state) {
|
|
2821
2810
|
//State is set and require to set the state
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
|
|
88
88
|
<script>
|
|
89
89
|
/* eslint-disable no-alert, no-console */
|
|
90
|
-
import {
|
|
90
|
+
import { markRaw } from 'vue'
|
|
91
91
|
import EventBus from './EventBus'
|
|
92
92
|
import FlatmapVuer from './FlatmapVuer.vue'
|
|
93
93
|
import * as flatmap from '@abi-software/flatmap-viewer'
|
|
@@ -120,12 +120,6 @@ export default {
|
|
|
120
120
|
Popover,
|
|
121
121
|
FlatmapVuer,
|
|
122
122
|
},
|
|
123
|
-
beforeMount() {
|
|
124
|
-
//List for resolving the promise in initialise
|
|
125
|
-
//if initialise is called multiple times
|
|
126
|
-
this._resolveList = []
|
|
127
|
-
this._initialised = false
|
|
128
|
-
},
|
|
129
123
|
mounted: function () {
|
|
130
124
|
this.initialise()
|
|
131
125
|
EventBus.on('onActionClick', (action) => {
|
|
@@ -160,7 +154,7 @@ export default {
|
|
|
160
154
|
// FIrst look through the uuid
|
|
161
155
|
const uuid = this.availableSpecies[key].uuid
|
|
162
156
|
if (uuid && data.map((e) => e.uuid).indexOf(uuid) > 0) {
|
|
163
|
-
this.speciesList[key] =
|
|
157
|
+
this.speciesList[key] = this.availableSpecies[key]
|
|
164
158
|
} else {
|
|
165
159
|
for (let i = 0; i < data.length; i++) {
|
|
166
160
|
if (this.availableSpecies[key].taxo === data[i].taxon) {
|
|
@@ -170,11 +164,11 @@ export default {
|
|
|
170
164
|
data[i].biologicalSex ===
|
|
171
165
|
this.availableSpecies[key].biologicalSex
|
|
172
166
|
) {
|
|
173
|
-
this.speciesList[key] =
|
|
167
|
+
this.speciesList[key] = this.availableSpecies[key]
|
|
174
168
|
break
|
|
175
169
|
}
|
|
176
170
|
} else {
|
|
177
|
-
this.speciesList[key] =
|
|
171
|
+
this.speciesList[key] = this.availableSpecies[key]
|
|
178
172
|
break
|
|
179
173
|
}
|
|
180
174
|
}
|
|
@@ -205,19 +199,19 @@ export default {
|
|
|
205
199
|
5
|
|
206
200
|
)
|
|
207
201
|
}
|
|
208
|
-
this.
|
|
202
|
+
this.initialised = true
|
|
209
203
|
resolve()
|
|
210
204
|
//Resolve all other promises resolve in the list
|
|
211
|
-
this.
|
|
205
|
+
this.resolveList.forEach((other) => {
|
|
212
206
|
other()
|
|
213
207
|
})
|
|
214
208
|
})
|
|
215
|
-
} else if (this.
|
|
209
|
+
} else if (this.initialised) {
|
|
216
210
|
//resolve as it has been initialised
|
|
217
211
|
resolve()
|
|
218
212
|
} else {
|
|
219
213
|
//resolve when the async initialisation is finished
|
|
220
|
-
this.
|
|
214
|
+
this.resolveList.push(resolve)
|
|
221
215
|
}
|
|
222
216
|
})
|
|
223
217
|
},
|
|
@@ -361,11 +355,11 @@ export default {
|
|
|
361
355
|
if (state.species.slice(0, 6) === 'Legacy') name = state.species
|
|
362
356
|
else name = name + ` ${state.species}`
|
|
363
357
|
}
|
|
364
|
-
this.speciesList[name] =
|
|
358
|
+
this.speciesList[name] = {
|
|
365
359
|
taxo: taxo,
|
|
366
360
|
isLegacy: true,
|
|
367
361
|
displayWarning: true,
|
|
368
|
-
}
|
|
362
|
+
}
|
|
369
363
|
return {
|
|
370
364
|
species: name,
|
|
371
365
|
state: {
|
|
@@ -517,6 +511,14 @@ export default {
|
|
|
517
511
|
*/
|
|
518
512
|
this.$emit('shown-map-tooltip');
|
|
519
513
|
},
|
|
514
|
+
/**
|
|
515
|
+
* @vuese
|
|
516
|
+
* Function to change the view mode of the map.
|
|
517
|
+
*/
|
|
518
|
+
changeViewingMode: function (modeName) {
|
|
519
|
+
let map = this.getCurrentFlatmap()
|
|
520
|
+
map.changeViewingMode(modeName)
|
|
521
|
+
},
|
|
520
522
|
},
|
|
521
523
|
props: {
|
|
522
524
|
/**
|
|
@@ -720,6 +722,8 @@ export default {
|
|
|
720
722
|
activeSpecies: undefined,
|
|
721
723
|
speciesList: {},
|
|
722
724
|
requireInitialisation: true,
|
|
725
|
+
resolveList: markRaw([]),
|
|
726
|
+
initialised: false,
|
|
723
727
|
}
|
|
724
728
|
},
|
|
725
729
|
watch: {
|
package/src/components.d.ts
CHANGED
|
@@ -8,7 +8,6 @@ export {}
|
|
|
8
8
|
declare module 'vue' {
|
|
9
9
|
export interface GlobalComponents {
|
|
10
10
|
DynamicLegends: typeof import('./components/legends/DynamicLegends.vue')['default']
|
|
11
|
-
ElAutocomplete: typeof import('element-plus/es')['ElAutocomplete']
|
|
12
11
|
ElButton: typeof import('element-plus/es')['ElButton']
|
|
13
12
|
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
|
|
14
13
|
ElCheckboxGroup: typeof import('element-plus/es')['ElCheckboxGroup']
|
|
@@ -24,7 +23,6 @@ declare module 'vue' {
|
|
|
24
23
|
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
|
|
25
24
|
ElRow: typeof import('element-plus/es')['ElRow']
|
|
26
25
|
ElSelect: typeof import('element-plus/es')['ElSelect']
|
|
27
|
-
ElSwitch: typeof import('element-plus/es')['ElSwitch']
|
|
28
26
|
FlatmapVuer: typeof import('./components/FlatmapVuer.vue')['default']
|
|
29
27
|
MultiFlatmapVuer: typeof import('./components/MultiFlatmapVuer.vue')['default']
|
|
30
28
|
SelectionsGroup: typeof import('./components/SelectionsGroup.vue')['default']
|