@abi-software/flatmapvuer 1.20.1-demo.1 → 1.21.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 +2494 -2358
- package/dist/flatmapvuer.umd.cjs +10 -18
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/src/App.vue +58 -23
- package/src/components/FlatmapVuer.vue +363 -250
- package/src/components/MultiFlatmapVuer.vue +151 -85
- package/src/components/legends/DynamicLegends.vue +12 -21
- package/src/services/flatmapQueries.js +408 -353
- package/src/services/somaLocationMarkers.js +0 -129
package/src/App.vue
CHANGED
|
@@ -10,8 +10,7 @@
|
|
|
10
10
|
<div class="options-container">
|
|
11
11
|
<el-row :gutter="20">
|
|
12
12
|
<el-col :span="8">
|
|
13
|
-
<el-button @click="
|
|
14
|
-
<el-button @click="startHelpHover" size="small">Hover Help</el-button>
|
|
13
|
+
<el-button @click="helpMode = !helpMode" size="small">Help Mode</el-button>
|
|
15
14
|
</el-col>
|
|
16
15
|
<el-col :span="8">
|
|
17
16
|
<el-button @click="saveSettings()" size="small">Save Settings</el-button>
|
|
@@ -58,6 +57,12 @@
|
|
|
58
57
|
@ready="FlatmapReady"
|
|
59
58
|
@context-restored="FlatmapReady"
|
|
60
59
|
:initial="initial"
|
|
60
|
+
:helpMode="helpMode"
|
|
61
|
+
:helpModeDialog="useHelpModeDialog"
|
|
62
|
+
:helpModeActiveItem="helpModeActiveItem"
|
|
63
|
+
@help-mode-last-item="onHelpModeLastItem"
|
|
64
|
+
@shown-tooltip="onTooltipShown"
|
|
65
|
+
@shown-map-tooltip="onMapTooltipShown"
|
|
61
66
|
:displayMinimap="true"
|
|
62
67
|
:enableOpenMapUI="true"
|
|
63
68
|
:flatmapAPI="flatmapAPI"
|
|
@@ -67,8 +72,14 @@
|
|
|
67
72
|
@flatmapChanged="onFlatmapChanged"
|
|
68
73
|
/>
|
|
69
74
|
|
|
70
|
-
<
|
|
71
|
-
|
|
75
|
+
<HelpModeDialog
|
|
76
|
+
v-if="helpMode && useHelpModeDialog"
|
|
77
|
+
ref="multiflatmapHelp"
|
|
78
|
+
:multiflatmapRef="multiflatmapRef"
|
|
79
|
+
:lastItem="helpModeLastItem"
|
|
80
|
+
@show-next="onHelpModeShowNext"
|
|
81
|
+
@finish-help-mode="onFinishHelpMode"
|
|
82
|
+
/>
|
|
72
83
|
</div>
|
|
73
84
|
</template>
|
|
74
85
|
|
|
@@ -78,15 +89,14 @@ import { markRaw, shallowRef } from 'vue';
|
|
|
78
89
|
import { Setting as ElIconSetting } from '@element-plus/icons-vue';
|
|
79
90
|
import './icons/mapicon-species-style.css';
|
|
80
91
|
import MultiFlatmapVuer from './components/MultiFlatmapVuer.vue';
|
|
81
|
-
import {
|
|
92
|
+
import { HelpModeDialog } from '@abi-software/map-utilities';
|
|
82
93
|
import '@abi-software/map-utilities/dist/style.css';
|
|
83
94
|
|
|
84
95
|
export default {
|
|
85
96
|
name: 'app',
|
|
86
97
|
components: {
|
|
87
98
|
MultiFlatmapVuer,
|
|
88
|
-
|
|
89
|
-
HelpModeHover,
|
|
99
|
+
HelpModeDialog,
|
|
90
100
|
},
|
|
91
101
|
methods: {
|
|
92
102
|
saveSettings: function () {
|
|
@@ -156,18 +166,35 @@ export default {
|
|
|
156
166
|
this.$refs.multi.getCurrentFlatmap().searchAndShowResult(this.searchText, true);
|
|
157
167
|
},
|
|
158
168
|
onFlatmapChanged: function (activeSpecies) {
|
|
169
|
+
this.helpMode = false;
|
|
159
170
|
// Update current flatmapImp after changing species
|
|
160
171
|
if (this.$refs.multi.$refs[activeSpecies][0].mapImp) {
|
|
161
172
|
window.flatmapImp = this.$refs.multi.$refs[activeSpecies][0].mapImp;
|
|
162
173
|
}
|
|
163
174
|
},
|
|
164
|
-
|
|
165
|
-
this.
|
|
166
|
-
|
|
175
|
+
onHelpModeShowNext: function () {
|
|
176
|
+
this.helpModeActiveItem += 1;
|
|
177
|
+
},
|
|
178
|
+
onHelpModeLastItem: function (isLastItem) {
|
|
179
|
+
if (isLastItem) {
|
|
180
|
+
this.helpModeLastItem = true;
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
onFinishHelpMode: function () {
|
|
184
|
+
this.helpMode = false;
|
|
185
|
+
// reset help mode to default values
|
|
186
|
+
this.helpModeActiveItem = 0;
|
|
187
|
+
this.helpModeLastItem = false;
|
|
188
|
+
},
|
|
189
|
+
onTooltipShown: function () {
|
|
190
|
+
if (this.$refs.multi && this.$refs.multiflatmapHelp) {
|
|
191
|
+
this.$refs.multiflatmapHelp.toggleTooltipHighlight();
|
|
192
|
+
}
|
|
167
193
|
},
|
|
168
|
-
|
|
169
|
-
this.
|
|
170
|
-
|
|
194
|
+
onMapTooltipShown: function () {
|
|
195
|
+
if (this.$refs.multi && this.$refs.multiflatmapHelp) {
|
|
196
|
+
this.$refs.multiflatmapHelp.toggleTooltipPinHighlight();
|
|
197
|
+
}
|
|
171
198
|
},
|
|
172
199
|
},
|
|
173
200
|
provide() {
|
|
@@ -241,19 +268,20 @@ export default {
|
|
|
241
268
|
},
|
|
242
269
|
displayCloseButton: false,
|
|
243
270
|
initial: 'Human Male',
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
271
|
+
helpMode: false,
|
|
272
|
+
helpModeActiveItem: 0,
|
|
273
|
+
helpModeLastItem: false,
|
|
274
|
+
useHelpModeDialog: true,
|
|
247
275
|
multiflatmapRef: null,
|
|
248
276
|
mapSettings: [],
|
|
249
|
-
//flatmapAPI:
|
|
250
|
-
//flatmapAPI:
|
|
277
|
+
// flatmapAPI: 'https://mapcore-demo.org/current/flatmap/v2/'
|
|
278
|
+
// flatmapAPI: 'https://mapcore-demo.org/devel/flatmap/v3/'
|
|
251
279
|
flatmapAPI: 'https://mapcore-demo.org/current/flatmap/v3/',
|
|
252
|
-
//flatmapAPI: 'https://mapcore-demo.org/devel/flatmap/v4/',
|
|
253
|
-
//flatmapAPI: 'https://mapcore-demo.org/curation/flatmap/',
|
|
254
|
-
//flatmapAPI:
|
|
255
|
-
//flatmapAPI:
|
|
256
|
-
// flatmapAPI:
|
|
280
|
+
// flatmapAPI: 'https://mapcore-demo.org/devel/flatmap/v4/',
|
|
281
|
+
// flatmapAPI: 'https://mapcore-demo.org/curation/flatmap/',
|
|
282
|
+
// flatmapAPI: 'https://mapcore-demo.org/fccb/flatmap/'
|
|
283
|
+
// flatmapAPI: 'https://mapcore-demo.org/staging/flatmap/v1/'
|
|
284
|
+
// flatmapAPI: 'https://mapcore-demo.org/devel/flatmap/v1/',
|
|
257
285
|
ElIconSetting: shallowRef(ElIconSetting),
|
|
258
286
|
annotator: markRaw(
|
|
259
287
|
new AnnotationService(`https://mapcore-demo.org/devel/flatmap/v4/annotator`),
|
|
@@ -306,6 +334,13 @@ export default {
|
|
|
306
334
|
window.multiflatmapRef = this.multiflatmapRef;
|
|
307
335
|
//window.flatmapRef = this.multiflatmapRef.getCurrentFlatmap();
|
|
308
336
|
},
|
|
337
|
+
watch: {
|
|
338
|
+
helpMode: function (newVal) {
|
|
339
|
+
if (!newVal) {
|
|
340
|
+
this.helpModeActiveItem = 0;
|
|
341
|
+
}
|
|
342
|
+
},
|
|
343
|
+
},
|
|
309
344
|
};
|
|
310
345
|
</script>
|
|
311
346
|
|