@abi-software/flatmapvuer 0.2.4-beta-0 → 0.2.4-beta-4
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.common.js +90 -73
- package/dist/flatmapvuer.common.js.map +1 -1
- package/dist/flatmapvuer.css +1 -1
- package/dist/flatmapvuer.umd.js +90 -73
- package/dist/flatmapvuer.umd.js.map +1 -1
- package/dist/flatmapvuer.umd.min.js +1 -1
- package/dist/flatmapvuer.umd.min.js.map +1 -1
- package/package-lock.json +137 -155
- package/package.json +3 -3
- package/src/App.vue +10 -3
- package/src/components/FlatmapVuer.vue +39 -25
- package/src/components/MultiFlatmapVuer.vue +4 -0
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
element-loading-spinner="el-icon-loading"
|
|
7
7
|
element-loading-background="rgba(0, 0, 0, 0.3)"
|
|
8
8
|
>
|
|
9
|
-
<
|
|
9
|
+
<map-svg-sprite-color />
|
|
10
10
|
<div style="height:100%;width:100%;position:relative;overflow-y:none">
|
|
11
11
|
<div style="height:100%;width:100%;" ref="display"></div>
|
|
12
12
|
<el-popover
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
popper-class="flatmap-popper left-popper"
|
|
38
38
|
v-model="hoverVisibilities[0].value"
|
|
39
39
|
>
|
|
40
|
-
<
|
|
40
|
+
<map-svg-icon
|
|
41
41
|
icon="zoomIn"
|
|
42
42
|
class="icon-button zoomIn"
|
|
43
43
|
slot="reference"
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
popper-class="flatmap-popper popper-zoomout"
|
|
55
55
|
v-model="hoverVisibilities[1].value"
|
|
56
56
|
>
|
|
57
|
-
<
|
|
57
|
+
<map-svg-icon
|
|
58
58
|
icon="zoomOut"
|
|
59
59
|
class="icon-button zoomOut"
|
|
60
60
|
slot="reference"
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
popper-class="flatmap-popper"
|
|
72
72
|
v-model="hoverVisibilities[2].value"
|
|
73
73
|
>
|
|
74
|
-
<
|
|
74
|
+
<map-svg-icon
|
|
75
75
|
icon="resetZoom"
|
|
76
76
|
class="icon-button resetView"
|
|
77
77
|
slot="reference"
|
|
@@ -197,7 +197,7 @@
|
|
|
197
197
|
trigger="manual"
|
|
198
198
|
popper-class="flatmap-popper right-popper"
|
|
199
199
|
>
|
|
200
|
-
<
|
|
200
|
+
<map-svg-icon
|
|
201
201
|
v-popover:backgroundPopover
|
|
202
202
|
icon="changeBckgd"
|
|
203
203
|
class="icon-button background-colour"
|
|
@@ -222,7 +222,7 @@
|
|
|
222
222
|
/* eslint-disable no-alert, no-console */
|
|
223
223
|
import Vue from "vue";
|
|
224
224
|
import Tooltip from "./Tooltip";
|
|
225
|
-
import {
|
|
225
|
+
import { MapSvgIcon, MapSvgSpriteColor } from "@abi-software/svg-sprite";
|
|
226
226
|
import {
|
|
227
227
|
Checkbox,
|
|
228
228
|
CheckboxGroup,
|
|
@@ -254,8 +254,8 @@ const mapResize = map => {
|
|
|
254
254
|
export default {
|
|
255
255
|
name: "FlatmapVuer",
|
|
256
256
|
components: {
|
|
257
|
-
|
|
258
|
-
|
|
257
|
+
MapSvgIcon,
|
|
258
|
+
MapSvgSpriteColor,
|
|
259
259
|
Tooltip
|
|
260
260
|
},
|
|
261
261
|
beforeCreate: function() {
|
|
@@ -338,24 +338,31 @@ export default {
|
|
|
338
338
|
this.mapImp.showPaths(this.checkedItems);
|
|
339
339
|
}
|
|
340
340
|
},
|
|
341
|
+
enablePanZoomEvents: function(flag) {
|
|
342
|
+
this.mapImp.enablePanZoomEvents(flag);
|
|
343
|
+
},
|
|
341
344
|
eventCallback: function() {
|
|
342
|
-
return (eventType,
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
345
|
+
return (eventType, data, ...args) => {
|
|
346
|
+
if (eventType !== "pan-zoom") {
|
|
347
|
+
const label = data.label;
|
|
348
|
+
const resource = [data.models];
|
|
349
|
+
const taxonomy = this.entry;
|
|
350
|
+
const payload = {
|
|
351
|
+
dataset: data.dataset,
|
|
352
|
+
taxonomy: taxonomy,
|
|
353
|
+
resource: resource,
|
|
354
|
+
label: label,
|
|
355
|
+
feature: data,
|
|
356
|
+
userData: args,
|
|
357
|
+
eventType: eventType
|
|
358
|
+
};
|
|
359
|
+
// Disable the nueron pop up for now.
|
|
360
|
+
if (data && data.type !== "marker")
|
|
361
|
+
this.checkAndCreatePopups(data);
|
|
362
|
+
this.$emit("resource-selected", payload);
|
|
363
|
+
} else {
|
|
364
|
+
this.$emit("pan-zoom-callback", data);
|
|
365
|
+
}
|
|
359
366
|
};
|
|
360
367
|
},
|
|
361
368
|
// checkNeuronClicked shows a neuron path pop up if a path was recently clicked
|
|
@@ -578,6 +585,13 @@ export default {
|
|
|
578
585
|
if (this.entry == state.entry) this._viewportToBeSet = state.viewport;
|
|
579
586
|
}
|
|
580
587
|
},
|
|
588
|
+
showMinimap: function(flag) {
|
|
589
|
+
if (this.mapImp)
|
|
590
|
+
this.mapImp.showMinimap(flag);
|
|
591
|
+
},
|
|
592
|
+
showPathwaysDrawer: function(flag) {
|
|
593
|
+
this.drawerOpen = flag;
|
|
594
|
+
},
|
|
581
595
|
/**
|
|
582
596
|
* Function to display features with annotation matching the provided term.
|
|
583
597
|
*/
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
:ref="key"
|
|
37
37
|
@resource-selected="FlatmapSelected"
|
|
38
38
|
@ready="FlatmapReady"
|
|
39
|
+
@pan-zoom-callback="panZoomCallback"
|
|
39
40
|
:featureInfo="featureInfo"
|
|
40
41
|
:minZoom="minZoom"
|
|
41
42
|
:pathControls="pathControls"
|
|
@@ -119,6 +120,9 @@ export default {
|
|
|
119
120
|
getCurrentFlatmap: function() {
|
|
120
121
|
return this.$refs[this.activeSpecies][0];
|
|
121
122
|
},
|
|
123
|
+
panZoomCallback: function(payload) {
|
|
124
|
+
this.$emit("pan-zoom-callback", payload);
|
|
125
|
+
},
|
|
122
126
|
showPopup: function(featureId, node, options) {
|
|
123
127
|
let map = this.getCurrentFlatmap();
|
|
124
128
|
map.showPopup(featureId, node, options);
|