@abi-software/flatmapvuer 0.2.3 → 0.2.4-beta-3
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 +152 -123
- package/dist/flatmapvuer.common.js.map +1 -1
- package/dist/flatmapvuer.css +1 -1
- package/dist/flatmapvuer.umd.js +152 -123
- 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 +187 -158
- package/package.json +4 -3
- package/src/App.vue +10 -3
- package/src/components/FlatmapVuer.vue +34 -26
- package/src/components/MultiFlatmapVuer.vue +4 -0
- package/src/components/PubmedViewer.vue +9 -1
- package/src/components/Tooltip.vue +8 -2
- package/vue.config.js +14 -0
- package/dist/fonts/element-icons.535877f5.woff +0 -0
- package/dist/fonts/element-icons.732389de.ttf +0 -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"
|
|
@@ -211,6 +211,7 @@
|
|
|
211
211
|
ref="tooltip"
|
|
212
212
|
class="tooltip"
|
|
213
213
|
:content="tooltipContent"
|
|
214
|
+
:flatmapAPI="flatmapAPI"
|
|
214
215
|
@resource-selected="resourceSelected"
|
|
215
216
|
/>
|
|
216
217
|
</div>
|
|
@@ -221,7 +222,7 @@
|
|
|
221
222
|
/* eslint-disable no-alert, no-console */
|
|
222
223
|
import Vue from "vue";
|
|
223
224
|
import Tooltip from "./Tooltip";
|
|
224
|
-
import {
|
|
225
|
+
import { MapSvgIcon, MapSvgSpriteColor } from "@abi-software/svg-sprite";
|
|
225
226
|
import {
|
|
226
227
|
Checkbox,
|
|
227
228
|
CheckboxGroup,
|
|
@@ -253,8 +254,8 @@ const mapResize = map => {
|
|
|
253
254
|
export default {
|
|
254
255
|
name: "FlatmapVuer",
|
|
255
256
|
components: {
|
|
256
|
-
|
|
257
|
-
|
|
257
|
+
MapSvgIcon,
|
|
258
|
+
MapSvgSpriteColor,
|
|
258
259
|
Tooltip
|
|
259
260
|
},
|
|
260
261
|
beforeCreate: function() {
|
|
@@ -337,24 +338,31 @@ export default {
|
|
|
337
338
|
this.mapImp.showPaths(this.checkedItems);
|
|
338
339
|
}
|
|
339
340
|
},
|
|
341
|
+
enablePanZoomEvents: function(flag) {
|
|
342
|
+
this.mapImp.enablePanZoomEvents(flag);
|
|
343
|
+
},
|
|
340
344
|
eventCallback: function() {
|
|
341
|
-
return (eventType,
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
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
|
+
}
|
|
358
366
|
};
|
|
359
367
|
},
|
|
360
368
|
// checkNeuronClicked shows a neuron path pop up if a path was recently clicked
|
|
@@ -633,7 +641,7 @@ export default {
|
|
|
633
641
|
},
|
|
634
642
|
warningMessage: {
|
|
635
643
|
type: String,
|
|
636
|
-
default: "Beta feature -
|
|
644
|
+
default: "Beta feature - This map is based on the connectivity of a rat. New connectivity and species specificity will be added as the SPARC program progress."
|
|
637
645
|
},
|
|
638
646
|
/**
|
|
639
647
|
* State containing state of the flatmap.
|
|
@@ -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);
|
|
@@ -43,6 +43,13 @@ export default {
|
|
|
43
43
|
type: String,
|
|
44
44
|
default: ''
|
|
45
45
|
},
|
|
46
|
+
/**
|
|
47
|
+
* Specify the endpoint of the flatmap server.
|
|
48
|
+
*/
|
|
49
|
+
flatmapAPI: {
|
|
50
|
+
type: String,
|
|
51
|
+
default: "https://mapcore-demo.org/flatmaps/"
|
|
52
|
+
}
|
|
46
53
|
},
|
|
47
54
|
watch: {
|
|
48
55
|
'featureId': function (val){
|
|
@@ -85,8 +92,9 @@ export default {
|
|
|
85
92
|
flatmapQuery: function(identifier){
|
|
86
93
|
this.pubmeds = []
|
|
87
94
|
this.loading.response = true
|
|
95
|
+
let endpoint = this.flatmapAPI + 'knowledge/query/';
|
|
88
96
|
const data = { sql: 'select publication from publications where entity=?', "params": [identifier]};
|
|
89
|
-
fetch(
|
|
97
|
+
fetch(endpoint, {
|
|
90
98
|
method: 'POST',
|
|
91
99
|
headers: {
|
|
92
100
|
'Content-Type': 'application/json',
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
</div>
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
<pubmed-viewer v-if="content.featureId" class="block" :featureId="content.featureId" @pubmedSearchUrl="pubmedSearchUrlUpdate"/>
|
|
12
|
+
<pubmed-viewer v-if="content.featureId" class="block" :flatmapAPI=flatmapAPI :featureId="content.featureId" @pubmedSearchUrl="pubmedSearchUrlUpdate"/>
|
|
13
13
|
<div v-if="content.components" class="block">
|
|
14
14
|
<div class="attribute-title">Components</div>
|
|
15
15
|
<span class="attribute-content">{{content.components}}</span>
|
|
@@ -71,6 +71,13 @@ export default {
|
|
|
71
71
|
content: {
|
|
72
72
|
type: Object,
|
|
73
73
|
default: undefined
|
|
74
|
+
},
|
|
75
|
+
/**
|
|
76
|
+
* Specify the endpoint of the flatmap server.
|
|
77
|
+
*/
|
|
78
|
+
flatmapAPI: {
|
|
79
|
+
type: String,
|
|
80
|
+
default: "https://mapcore-demo.org/flatmaps/"
|
|
74
81
|
}
|
|
75
82
|
},
|
|
76
83
|
data: function() {
|
|
@@ -104,7 +111,6 @@ export default {
|
|
|
104
111
|
@import "~element-ui/packages/theme-chalk/src/button";
|
|
105
112
|
@import "~element-ui/packages/theme-chalk/src/container";
|
|
106
113
|
@import "~element-ui/packages/theme-chalk/src/header";
|
|
107
|
-
@import "~element-ui/packages/theme-chalk/src/icon";
|
|
108
114
|
@import "~element-ui/packages/theme-chalk/src/main";
|
|
109
115
|
|
|
110
116
|
.tooltip-container {
|
package/vue.config.js
CHANGED
|
@@ -6,6 +6,20 @@ module.exports = {
|
|
|
6
6
|
config.externals = [nodeExternals({}) ];
|
|
7
7
|
}
|
|
8
8
|
},
|
|
9
|
+
chainWebpack: config => {
|
|
10
|
+
const fontsRule = config.module.rule('fonts')
|
|
11
|
+
fontsRule.uses.clear()
|
|
12
|
+
config.module
|
|
13
|
+
.rule('fonts')
|
|
14
|
+
.test(/\.(ttf|otf|eot|woff|woff2)$/)
|
|
15
|
+
.use('base64-inline-loader')
|
|
16
|
+
.loader('base64-inline-loader')
|
|
17
|
+
.tap(options => {
|
|
18
|
+
// modify the options...
|
|
19
|
+
return options
|
|
20
|
+
})
|
|
21
|
+
.end()
|
|
22
|
+
},
|
|
9
23
|
css: {
|
|
10
24
|
//Import variables into all stylesheets.
|
|
11
25
|
loaderOptions: {
|
|
Binary file
|
|
Binary file
|