@abi-software/flatmapvuer 0.4.1-beta.3 → 0.4.1
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 +71 -81
- package/dist/flatmapvuer.common.js.map +1 -1
- package/dist/flatmapvuer.css +1 -1
- package/dist/flatmapvuer.umd.js +71 -81
- package/dist/flatmapvuer.umd.js.map +1 -1
- package/dist/flatmapvuer.umd.min.js +2 -2
- package/dist/flatmapvuer.umd.min.js.map +1 -1
- package/package-lock.json +4 -4
- package/package.json +2 -2
- package/src/App.vue +54 -1
- package/src/components/FlatmapVuer.vue +17 -11
- package/src/components/MultiFlatmapVuer.vue +0 -5
package/package-lock.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abi-software/flatmapvuer",
|
|
3
|
-
"version": "0.4.1
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"lockfileVersion": 1,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@abi-software/flatmap-viewer": {
|
|
8
|
-
"version": "2.3.
|
|
9
|
-
"resolved": "https://registry.npmjs.org/@abi-software/flatmap-viewer/-/flatmap-viewer-2.3.
|
|
10
|
-
"integrity": "sha512-
|
|
8
|
+
"version": "2.3.3-b.4",
|
|
9
|
+
"resolved": "https://registry.npmjs.org/@abi-software/flatmap-viewer/-/flatmap-viewer-2.3.3-b.4.tgz",
|
|
10
|
+
"integrity": "sha512-rJoASw3Ngj69LhuBsvKtIsU8brcFv0exBgz9EE+Cv4wSD8SUO02P81u9FE9giDOa9DGNGZT5gO4bqWqlNdbMow==",
|
|
11
11
|
"requires": {
|
|
12
12
|
"@babel/runtime": "^7.10.4",
|
|
13
13
|
"@fortawesome/fontawesome-free": "^6.4.0",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abi-software/flatmapvuer",
|
|
3
|
-
"version": "0.4.1
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "./dist/flatmapvuer.common.js",
|
|
6
6
|
"files": [
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"lint": "vue-cli-service lint"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@abi-software/flatmap-viewer": "^2.3.
|
|
25
|
+
"@abi-software/flatmap-viewer": "^2.3.3-b.4",
|
|
26
26
|
"@abi-software/svg-sprite": "^0.1.14",
|
|
27
27
|
"core-js": "^3.3.2",
|
|
28
28
|
"css-element-queries": "^1.2.2",
|
package/src/App.vue
CHANGED
|
@@ -12,6 +12,13 @@
|
|
|
12
12
|
<el-button @click="helpMode = !helpMode" size="mini">Help Mode</el-button>
|
|
13
13
|
<el-button @click="saveSettings()" size="mini">Save Settings</el-button>
|
|
14
14
|
<el-button :disabled="mapSettings.length === 0" @click="restoreSettings()" size="mini">Restore Settings</el-button>
|
|
15
|
+
<el-autocomplete class="search-box" placeholder="Search"
|
|
16
|
+
v-model="searchText"
|
|
17
|
+
:fetch-suggestions="fetchSuggestions"
|
|
18
|
+
@keyup.enter.native="search"
|
|
19
|
+
@select="search"
|
|
20
|
+
popper-class="autocomplete-popper">
|
|
21
|
+
</el-autocomplete>
|
|
15
22
|
</el-row>
|
|
16
23
|
</div>
|
|
17
24
|
<el-button class="options-button" icon="el-icon-setting" slot="reference">Options</el-button>
|
|
@@ -32,12 +39,14 @@
|
|
|
32
39
|
import Vue from "vue";
|
|
33
40
|
import MultiFlatmapVuer from './components/MultiFlatmapVuer.vue'
|
|
34
41
|
import {
|
|
42
|
+
Autocomplete,
|
|
35
43
|
Button,
|
|
36
44
|
Col,
|
|
37
45
|
Popover,
|
|
38
46
|
Row,
|
|
39
47
|
} from 'element-ui';
|
|
40
48
|
import "./icons/mapicon-species-style.css";
|
|
49
|
+
Vue.use(Autocomplete);
|
|
41
50
|
Vue.use(Button);
|
|
42
51
|
Vue.use(Col);
|
|
43
52
|
Vue.use(Popover);
|
|
@@ -69,10 +78,34 @@ export default {
|
|
|
69
78
|
},
|
|
70
79
|
panZoomcallback: function(payload) {
|
|
71
80
|
this.payload = payload
|
|
81
|
+
},
|
|
82
|
+
fetchSuggestions: function(term, cb) {
|
|
83
|
+
if (term === "") {
|
|
84
|
+
cb([]);
|
|
85
|
+
} else {
|
|
86
|
+
const suggestions = [];
|
|
87
|
+
const results = this.$refs.multi.getCurrentFlatmap().searchSuggestions(term);
|
|
88
|
+
results.__featureIds.forEach(id => {
|
|
89
|
+
const annotation = this.$refs.multi.getCurrentFlatmap().mapImp.annotation(id);
|
|
90
|
+
if (annotation && annotation.label)
|
|
91
|
+
suggestions.push(annotation.label);
|
|
92
|
+
});
|
|
93
|
+
const unique = new Set(suggestions);
|
|
94
|
+
suggestions.length = 0;
|
|
95
|
+
for (const item of unique) {
|
|
96
|
+
suggestions.push({"value": "\"" + item +"\""});
|
|
97
|
+
}
|
|
98
|
+
cb(suggestions);
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
search: function() {
|
|
102
|
+
console.log(this.searchText)
|
|
103
|
+
this.$refs.multi.getCurrentFlatmap().searchAndShowResult(this.searchText, true);
|
|
72
104
|
}
|
|
73
105
|
},
|
|
74
106
|
data: function(){
|
|
75
107
|
return {
|
|
108
|
+
searchText: "",
|
|
76
109
|
featureInfo: true,
|
|
77
110
|
searchable: true,
|
|
78
111
|
pathControls: true,
|
|
@@ -87,7 +120,6 @@ export default {
|
|
|
87
120
|
"Pig":{taxo: "NCBITaxon:9823", iconClass:"mapicon-icon_pig", displayWarning:true},
|
|
88
121
|
"Cat":{taxo: "NCBITaxon:9685", iconClass:"mapicon-icon_cat", displayWarning:true},
|
|
89
122
|
"Functional Connectivity": {taxo: "FunctionalConnectivity", displayWarning:true},
|
|
90
|
-
"digestive tract":{taxo: "digestive tract", displayWarning:true}
|
|
91
123
|
},
|
|
92
124
|
tooltipContent: undefined,
|
|
93
125
|
tStyle: {
|
|
@@ -114,6 +146,7 @@ export default {
|
|
|
114
146
|
</script>
|
|
115
147
|
|
|
116
148
|
<style lang="scss">
|
|
149
|
+
@import "~element-ui/packages/theme-chalk/src/autocomplete";
|
|
117
150
|
@import "~element-ui/packages/theme-chalk/src/button";
|
|
118
151
|
@import "~element-ui/packages/theme-chalk/src/col";
|
|
119
152
|
@import "~element-ui/packages/theme-chalk/src/popover";
|
|
@@ -134,6 +167,26 @@ export default {
|
|
|
134
167
|
margin-top:120px;
|
|
135
168
|
}
|
|
136
169
|
|
|
170
|
+
.search-box {
|
|
171
|
+
margin-top: 2px;
|
|
172
|
+
height:28px;
|
|
173
|
+
::v-deep .el-input__inner {
|
|
174
|
+
background-color: $background;
|
|
175
|
+
height:28px;
|
|
176
|
+
line-height:28px;
|
|
177
|
+
border: 1px solid rgb(144, 147, 153);
|
|
178
|
+
border-radius: 4px;
|
|
179
|
+
&:focus {
|
|
180
|
+
border-color: $app-primary-color;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
::v-deep .autocomplete-popper {
|
|
186
|
+
min-width:137px!important;
|
|
187
|
+
width: auto!important;
|
|
188
|
+
}
|
|
189
|
+
|
|
137
190
|
body {
|
|
138
191
|
margin: 0px;
|
|
139
192
|
}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
<div class="beta-popovers">
|
|
14
14
|
<div>
|
|
15
15
|
<el-popover
|
|
16
|
-
:content="
|
|
16
|
+
:content="getWarningMessage"
|
|
17
17
|
placement="right"
|
|
18
18
|
:appendToBody="false"
|
|
19
19
|
trigger="manual"
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
></el-popover>
|
|
24
24
|
<i
|
|
25
25
|
class="el-icon-warning warning-icon"
|
|
26
|
-
v-if="displayWarning
|
|
26
|
+
v-if="displayWarning"
|
|
27
27
|
@mouseover="showToolitip(6)"
|
|
28
28
|
@mouseout="hideToolitip(6)"
|
|
29
29
|
v-popover:warningPopover
|
|
@@ -163,6 +163,7 @@
|
|
|
163
163
|
ref="systemsSelection"
|
|
164
164
|
key="systemsSelection"
|
|
165
165
|
/>
|
|
166
|
+
<!--
|
|
166
167
|
<selections-group
|
|
167
168
|
v-if="!isFC && centreLines && centreLines.length > 0"
|
|
168
169
|
title="Nerves"
|
|
@@ -173,7 +174,6 @@
|
|
|
173
174
|
ref="centrelinesSelection"
|
|
174
175
|
key="centrelinesSelection"
|
|
175
176
|
/>
|
|
176
|
-
<!--
|
|
177
177
|
<selections-group
|
|
178
178
|
v-if="isFC && sckanDisplay && sckanDisplay.length > 0"
|
|
179
179
|
title="SCKAN"
|
|
@@ -745,11 +745,12 @@ export default {
|
|
|
745
745
|
const computed = getComputedStyle(elem);
|
|
746
746
|
const padding = parseInt(computed.paddingTop) + parseInt(computed.paddingBottom);
|
|
747
747
|
const height = elem.clientHeight - padding;
|
|
748
|
-
this.pathwaysMaxHeight = height -
|
|
748
|
+
this.pathwaysMaxHeight = height - 170;
|
|
749
749
|
}
|
|
750
750
|
},
|
|
751
751
|
mapResize: function() {
|
|
752
752
|
try {
|
|
753
|
+
this.computePathControlsMaximumHeight();
|
|
753
754
|
if (this.mapImp) {
|
|
754
755
|
this.mapImp.resize();
|
|
755
756
|
this.showMinimap(this.displayMinimap);
|
|
@@ -757,7 +758,6 @@ export default {
|
|
|
757
758
|
this.mapImp._minimap.resize();
|
|
758
759
|
}
|
|
759
760
|
}
|
|
760
|
-
this.computePathControlsMaximumHeight();
|
|
761
761
|
} catch {
|
|
762
762
|
console.error("Map resize error");
|
|
763
763
|
}
|
|
@@ -812,7 +812,7 @@ export default {
|
|
|
812
812
|
this.mapImp.showPopup(
|
|
813
813
|
searchResults.results[0].featureId,
|
|
814
814
|
searchResults.results[0].text,
|
|
815
|
-
{className: "custom-popup", positionAtLastClick: false }
|
|
815
|
+
{ className: "custom-popup", positionAtLastClick: false, preserveSelection: true }
|
|
816
816
|
)
|
|
817
817
|
}
|
|
818
818
|
return true;
|
|
@@ -878,10 +878,6 @@ export default {
|
|
|
878
878
|
type: Boolean,
|
|
879
879
|
default: false
|
|
880
880
|
},
|
|
881
|
-
warningMessage: {
|
|
882
|
-
type: String,
|
|
883
|
-
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."
|
|
884
|
-
},
|
|
885
881
|
isLegacy: {
|
|
886
882
|
type: Boolean,
|
|
887
883
|
default: false
|
|
@@ -892,7 +888,7 @@ export default {
|
|
|
892
888
|
},
|
|
893
889
|
latestChangesMessage: {
|
|
894
890
|
type: String,
|
|
895
|
-
default: "Search now provide suggested terms. Add new legends. New tilesets. New female map. Improve upstream downstream information",
|
|
891
|
+
default: "Search now provide suggested terms. Add new legends. New tilesets. New female map. Improve upstream downstream information.",
|
|
896
892
|
},
|
|
897
893
|
/**
|
|
898
894
|
* State containing state of the flatmap.
|
|
@@ -979,6 +975,16 @@ export default {
|
|
|
979
975
|
deep: true
|
|
980
976
|
}
|
|
981
977
|
},
|
|
978
|
+
computed: {
|
|
979
|
+
getWarningMessage: function() {
|
|
980
|
+
if (this.isLegacy) {
|
|
981
|
+
return "This is a legacy map, you may view the latest map instead.";
|
|
982
|
+
} else if (this.isFC) {
|
|
983
|
+
return "Beta feature - The connectivity shown here is the subset of neurons from the neuron populations in ApiNATOMY models which are at the same spatial scale and level of granularity.";
|
|
984
|
+
}
|
|
985
|
+
return "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.";
|
|
986
|
+
},
|
|
987
|
+
},
|
|
982
988
|
mounted: function() {
|
|
983
989
|
const flatmap = require("@abi-software/flatmap-viewer");
|
|
984
990
|
this.mapManager = new flatmap.MapManager(this.flatmapAPI);
|
|
@@ -33,7 +33,6 @@
|
|
|
33
33
|
:entry="item.taxo"
|
|
34
34
|
:biologicalSex="item.biologicalSex"
|
|
35
35
|
:displayWarning="item.displayWarning"
|
|
36
|
-
:warningMessage="warningMessage"
|
|
37
36
|
:displayLatestChanges="item.displayLatestChanges"
|
|
38
37
|
:latestChangesMessage="item.latestChangesMessage"
|
|
39
38
|
:isLegacy="item.isLegacy"
|
|
@@ -378,10 +377,6 @@ export default {
|
|
|
378
377
|
type: Boolean,
|
|
379
378
|
default: false
|
|
380
379
|
},
|
|
381
|
-
warningMessage: {
|
|
382
|
-
type: String,
|
|
383
|
-
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."
|
|
384
|
-
},
|
|
385
380
|
availableSpecies: {
|
|
386
381
|
type: Object,
|
|
387
382
|
default: function() {
|