@abi-software/mapintegratedvuer 1.1.0-beta.5 → 1.1.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/README.md +15 -2
- package/dist/{ContentMixin-C35Jowvp.js → ContentMixin-mZX2duoM.js} +97 -61
- package/dist/Flatmap-9QQ19krS.js +146 -0
- package/dist/{Iframe-fcNscihB.js → Iframe-c0h0PhkG.js} +2 -2
- package/dist/{MultiFlatmap-BIT2tVyE.js → MultiFlatmap-ft_NGtN3.js} +82 -65
- package/dist/{Plot-B9xsWP2v.js → Plot-BmyzQ7ix.js} +2 -2
- package/dist/{Scaffold-DYoxAJI0.js → Scaffold-B7UCL6S4.js} +10924 -10527
- package/dist/{Simulation-s1KOrb80.js → Simulation-OLJ83BaS.js} +2 -2
- package/dist/{flatmapvuer-BM5z_95w.js → flatmapvuer-BAx-xO4L.js} +11714 -11457
- package/dist/{index-DIFC-Q9x.js → index-nmieCwQF.js} +4369 -4335
- package/dist/mapintegratedvuer.js +1 -1
- package/dist/mapintegratedvuer.umd.cjs +479 -479
- package/dist/style-UwGHggI4.js +62 -0
- package/dist/style.css +1 -1
- package/package.json +7 -4
- package/src/App.vue +10 -1
- package/src/components/ContentVuer.vue +10 -10
- package/src/components/FlatmapContextCard.vue +22 -10
- package/src/components/MapContent.vue +20 -2
- package/src/components/SplitDialog.vue +4 -4
- package/src/components/SplitFlow.vue +6 -9
- package/src/components/viewers/Flatmap.vue +50 -25
- package/src/components/viewers/MultiFlatmap.vue +59 -32
- package/src/components/viewers/Scaffold.vue +46 -24
- package/src/components.d.ts +0 -1
- package/src/mixins/ContentMixin.js +72 -3
- package/src/mixins/DynamicMarkerMixin.js +44 -25
- package/src/services/tagging.js +3 -4
- package/src/stores/settings.js +5 -1
- package/src/stores/splitFlow.js +42 -30
- package/dist/Flatmap-9P71mP5D.js +0 -128
- package/dist/style-B-Ps72EF.js +0 -50
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@abi-software/mapintegratedvuer",
|
3
|
-
"version": "1.1.
|
3
|
+
"version": "1.1.1",
|
4
4
|
"license": "Apache-2.0",
|
5
5
|
"scripts": {
|
6
6
|
"serve": "vite --host --force",
|
@@ -48,10 +48,10 @@
|
|
48
48
|
"*.js"
|
49
49
|
],
|
50
50
|
"dependencies": {
|
51
|
-
"@abi-software/flatmapvuer": "
|
51
|
+
"@abi-software/flatmapvuer": "1.1.1",
|
52
52
|
"@abi-software/map-side-bar": "^2.2.0",
|
53
53
|
"@abi-software/plotvuer": "1.0.0",
|
54
|
-
"@abi-software/scaffoldvuer": "^1.1.0
|
54
|
+
"@abi-software/scaffoldvuer": "^1.1.0",
|
55
55
|
"@abi-software/simulationvuer": "1.0.0",
|
56
56
|
"@abi-software/svg-sprite": "1.0.0",
|
57
57
|
"@element-plus/icons-vue": "^2.3.1",
|
@@ -89,7 +89,7 @@
|
|
89
89
|
"happy-dom": "^13.3.8",
|
90
90
|
"jsdom": "^16.2.2",
|
91
91
|
"jsdom-global": "^3.0.2",
|
92
|
-
"mocha": "^
|
92
|
+
"mocha": "^10.4.0",
|
93
93
|
"mochapack": "^2.1.4",
|
94
94
|
"mochawesome": "^7.1.3",
|
95
95
|
"mochawesome-merge": "^4.3.0",
|
@@ -124,6 +124,9 @@
|
|
124
124
|
}
|
125
125
|
]
|
126
126
|
},
|
127
|
+
"overrides": {
|
128
|
+
"@abi-software/flatmapvuer": "$@abi-software/flatmapvuer"
|
129
|
+
},
|
127
130
|
"browserslist": [
|
128
131
|
"> 1%",
|
129
132
|
"last 2 versions"
|
package/src/App.vue
CHANGED
@@ -32,7 +32,16 @@
|
|
32
32
|
</el-popover>
|
33
33
|
</div>
|
34
34
|
<div class="map-app">
|
35
|
-
<MapContent
|
35
|
+
<MapContent
|
36
|
+
ref="map"
|
37
|
+
:startingMap="startingMap"
|
38
|
+
:options="options"
|
39
|
+
:state="state"
|
40
|
+
:shareLink="shareLink"
|
41
|
+
:useHelpModeDialog="true"
|
42
|
+
@updateShareLinkRequested="updateUUID"
|
43
|
+
@isReady="mapIsReady"
|
44
|
+
/>
|
36
45
|
</div>
|
37
46
|
</div>
|
38
47
|
</template>
|
@@ -79,19 +79,19 @@ export default {
|
|
79
79
|
},
|
80
80
|
methods: {
|
81
81
|
flatmapProvenacneReady: function(prov) {
|
82
|
-
this.$refs.contentBar
|
82
|
+
this.$refs.contentBar?.setupFlatmapContextCard(prov);
|
83
83
|
},
|
84
84
|
/**
|
85
85
|
* Toggle sync mode on/off depending on species and current state
|
86
86
|
*/
|
87
87
|
toggleSyncMode: function () {
|
88
|
-
this.$refs.viewer
|
88
|
+
this.$refs.viewer?.toggleSyncMode();
|
89
89
|
},
|
90
90
|
getId: function () {
|
91
91
|
return this.entry.id;
|
92
92
|
},
|
93
93
|
getState: function () {
|
94
|
-
return this.$refs.viewer
|
94
|
+
return this.$refs.viewer?.getState();
|
95
95
|
},
|
96
96
|
resourceSelected: function (payload) {
|
97
97
|
this.$emit("resource-selected", payload);
|
@@ -101,32 +101,32 @@ export default {
|
|
101
101
|
this.entriesStore.updateViewForEntry({id: this.entry.id, viewUrl});
|
102
102
|
} else {
|
103
103
|
//Manually set it as it cannot be set with reactivity
|
104
|
-
this.$refs.viewer
|
104
|
+
this.$refs.viewer?.updateWithViewUrl(viewUrl);
|
105
105
|
}
|
106
106
|
},
|
107
107
|
/**
|
108
108
|
* Perform a local search on this contentvuer
|
109
109
|
*/
|
110
110
|
search: function (term) {
|
111
|
-
return this.$refs.viewer
|
111
|
+
return this.$refs.viewer?.search(term);
|
112
112
|
},
|
113
113
|
/**
|
114
114
|
* Push the suggested terms into the suggestions array
|
115
115
|
*/
|
116
116
|
searchSuggestions: function(term, suggestions) {
|
117
|
-
this.$refs.viewer
|
117
|
+
this.$refs.viewer?.searchSuggestions(term, suggestions);
|
118
118
|
},
|
119
119
|
setPanesBoundary: function() {
|
120
|
-
this.$refs.contentBar
|
120
|
+
this.$refs.contentBar?.setBoundary(this.$refs["container"][0]);
|
121
121
|
},
|
122
122
|
speciesChanged: function (species) {
|
123
123
|
this.activeSpecies = species;
|
124
124
|
},
|
125
125
|
receiveSynchronisedEvent: async function (data) {
|
126
|
-
this.$refs.viewer
|
126
|
+
this.$refs.viewer?.receiveSynchronisedEvent(data);
|
127
127
|
},
|
128
128
|
requestSynchronisedEvent: function (flag) {
|
129
|
-
this.$refs.viewer
|
129
|
+
this.$refs.viewer?.requestSynchronisedEvent(flag);
|
130
130
|
},
|
131
131
|
/**
|
132
132
|
* Check if this viewer is currently visible
|
@@ -136,7 +136,7 @@ export default {
|
|
136
136
|
return paneName !== undefined;
|
137
137
|
},
|
138
138
|
onResize: function () {
|
139
|
-
this.$refs.viewer
|
139
|
+
this.$refs.viewer?.onResize();
|
140
140
|
},
|
141
141
|
},
|
142
142
|
data: function () {
|
@@ -56,22 +56,34 @@ export default {
|
|
56
56
|
sckanReleaseDisplay: function() {
|
57
57
|
let sckanRelease = "Unknown"
|
58
58
|
if(this.mapImpProv){
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
59
|
+
sckanRelease = this.mapImpProv.connectivity?.npo.date
|
60
|
+
if (!sckanRelease) {
|
61
|
+
let sckanCreated = this.mapImpProv.sckan?.created ? this.mapImpProv.sckan.created : this.mapImpProv.sckan
|
62
|
+
let isoTime = sckanCreated.replace(',', '.') // Date time does not accept commas but Sckan uses them
|
63
|
+
sckanRelease = new Date(isoTime).toLocaleDateString('en-US', {
|
64
|
+
day: '2-digit',
|
65
|
+
month: 'long',
|
66
|
+
year: 'numeric',
|
67
|
+
})
|
68
|
+
}
|
69
|
+
if (!sckanRelease) {
|
70
|
+
sckanRelease = "Unknown";
|
71
|
+
}
|
66
72
|
}
|
67
73
|
return sckanRelease
|
68
74
|
},
|
69
75
|
sckanReleaseLink: function() {
|
70
|
-
let
|
76
|
+
let sckanLink = "Unknown"
|
71
77
|
if(this.mapImpProv){
|
72
|
-
|
78
|
+
sckanLink = this.mapImpProv.connectivity?.npo.path
|
79
|
+
if (!sckanLink) {
|
80
|
+
sckanLink = this.mapImpProv.sckan?.release
|
81
|
+
}
|
82
|
+
if (!sckanLink) {
|
83
|
+
sckanLink = "Unknown"
|
84
|
+
}
|
73
85
|
}
|
74
|
-
return
|
86
|
+
return sckanLink
|
75
87
|
},
|
76
88
|
flatmapSource: function() {
|
77
89
|
let flatmapSource = "Unknown"
|
@@ -24,6 +24,7 @@ import SplitFlow from './SplitFlow.vue';
|
|
24
24
|
import EventBus from './EventBus';
|
25
25
|
import { mapStores } from 'pinia';
|
26
26
|
import { useSettingsStore } from '../stores/settings';
|
27
|
+
import { useSplitFlowStore } from '../stores/splitFlow';
|
27
28
|
import { findSpeciesKey } from './scripts/utilities.js';
|
28
29
|
import { MapSvgSpriteColor} from '@abi-software/svg-sprite';
|
29
30
|
import { initialState } from "./scripts/utilities.js";
|
@@ -72,7 +73,16 @@ export default {
|
|
72
73
|
startingMap: {
|
73
74
|
type: String,
|
74
75
|
default: "AC"
|
75
|
-
}
|
76
|
+
},
|
77
|
+
/**
|
78
|
+
* To use help-mode-dialog when user clicks "Help".
|
79
|
+
* This option is available on Flatmap, MultiFlatmap, and Scaffold.
|
80
|
+
* When this is set to `true`, "Help" tooltips will be shown one by one.
|
81
|
+
*/
|
82
|
+
useHelpModeDialog: {
|
83
|
+
type: Boolean,
|
84
|
+
default: false,
|
85
|
+
},
|
76
86
|
},
|
77
87
|
data: function () {
|
78
88
|
return {
|
@@ -264,7 +274,7 @@ export default {
|
|
264
274
|
},
|
265
275
|
},
|
266
276
|
computed: {
|
267
|
-
...mapStores(useSettingsStore),
|
277
|
+
...mapStores(useSettingsStore, useSplitFlowStore),
|
268
278
|
stateToSet() {
|
269
279
|
return this.state ? this.state : this.initialState;
|
270
280
|
},
|
@@ -289,6 +299,7 @@ export default {
|
|
289
299
|
this.options.nlLinkPrefix ? this.settingsStore.updateNLLinkPrefix(this.options.nlLinkPrefix) : null
|
290
300
|
this.options.rootUrl ? this.settingsStore.updateRootUrl(this.options.rootUrl) : null
|
291
301
|
}
|
302
|
+
this.splitFlowStore?.reset();
|
292
303
|
},
|
293
304
|
mounted: async function() {
|
294
305
|
EventBus.on("updateShareLinkRequested", () => {
|
@@ -297,10 +308,17 @@ export default {
|
|
297
308
|
*/
|
298
309
|
this.$emit("updateShareLinkRequested");
|
299
310
|
});
|
311
|
+
EventBus.on('trackEvent', (taggingData) => {
|
312
|
+
/**
|
313
|
+
* This event triggers data tracking for Google Tag Manager (GTM) related to map interactions.
|
314
|
+
*/
|
315
|
+
this.$emit('trackEvent', taggingData);
|
316
|
+
});
|
300
317
|
if (!this.state) {
|
301
318
|
this.initialState = await initialState(this.startingMap, this.options.sparcApi);
|
302
319
|
}
|
303
320
|
this.isReady = true;
|
321
|
+
this.settingsStore.updateUseHelpModeDialog(this.useHelpModeDialog);
|
304
322
|
}
|
305
323
|
}
|
306
324
|
|
@@ -73,10 +73,10 @@ export default {
|
|
73
73
|
return refName;
|
74
74
|
},
|
75
75
|
getStyle: function(id) {
|
76
|
-
/*
|
77
|
-
Set the style based on the position of the spltters
|
76
|
+
/*
|
77
|
+
Set the style based on the position of the spltters
|
78
78
|
Header is 30px in height and the splitter is 1px in
|
79
|
-
height/width. The width, height and positon of the
|
79
|
+
height/width. The width, height and positon of the
|
80
80
|
viewer should take that into account.
|
81
81
|
*/
|
82
82
|
const refName = this.getRefsName(id);
|
@@ -124,7 +124,7 @@ export default {
|
|
124
124
|
return states;
|
125
125
|
},
|
126
126
|
setStyles: function(refName, rect) {
|
127
|
-
if (this.$refs &&
|
127
|
+
if (this.$refs && this.$refs.tabContainer) {
|
128
128
|
const bound = this.$refs.tabContainer.getBoundingClientRect();
|
129
129
|
const style = {};
|
130
130
|
style["width"] = `${rect.width}px`;
|
@@ -95,7 +95,6 @@ export default {
|
|
95
95
|
activeDockedId : 1,
|
96
96
|
filterTriggered: false,
|
97
97
|
availableFacets: [],
|
98
|
-
hoveredMarkerDelay: undefined,
|
99
98
|
}
|
100
99
|
},
|
101
100
|
watch: {
|
@@ -258,14 +257,7 @@ export default {
|
|
258
257
|
hoverChanged: function (data) {
|
259
258
|
const hoverEntries = data && data.anatomy ? data.anatomy : []
|
260
259
|
this.settingsStore.updateHoveredMarkers(hoverEntries);
|
261
|
-
|
262
|
-
this.hoveredMarkerDelay = setTimeout(() => {
|
263
|
-
EventBus.emit("markerUpdate");
|
264
|
-
}, 3000)
|
265
|
-
} else {
|
266
|
-
clearTimeout(this.hoveredMarkerDelay)
|
267
|
-
EventBus.emit("markerUpdate");
|
268
|
-
}
|
260
|
+
EventBus.emit("markerUpdate");
|
269
261
|
},
|
270
262
|
searchChanged: function (data) {
|
271
263
|
if (data && data.type == "query-update") {
|
@@ -487,6 +479,11 @@ export default {
|
|
487
479
|
EventBus.on("OpenNewMap", type => {
|
488
480
|
this.openNewMap(type);
|
489
481
|
});
|
482
|
+
EventBus.on("startHelp", () => {
|
483
|
+
if (this.$refs.sideBar) {
|
484
|
+
this.$refs.sideBar.close();
|
485
|
+
}
|
486
|
+
});
|
490
487
|
this.$nextTick(() => {
|
491
488
|
if (this.search === "" && this._facets.length === 0) {
|
492
489
|
if (this.$refs.sideBar) {
|
@@ -1,29 +1,47 @@
|
|
1
1
|
<template>
|
2
|
-
<
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
2
|
+
<div class="viewer-container">
|
3
|
+
<FlatmapVuer
|
4
|
+
:state="entry.state"
|
5
|
+
:entry="entry.resource"
|
6
|
+
@resource-selected="flatmaprResourceSelected(entry.type, $event)"
|
7
|
+
@pan-zoom-callback="flatmapPanZoomCallback"
|
8
|
+
:name="entry.resource"
|
9
|
+
style="height: 100%; width: 100%"
|
10
|
+
:minZoom="entry.minZoom"
|
11
|
+
:helpMode="helpMode"
|
12
|
+
:helpModeActiveItem="helpModeActiveItem"
|
13
|
+
:helpModeInitialIndex="-1"
|
14
|
+
:helpModeDialog="useHelpModeDialog"
|
15
|
+
@help-mode-last-item="onHelpModeLastItem"
|
16
|
+
@shown-tooltip="onTooltipShown"
|
17
|
+
@shown-map-tooltip="onMapTooltipShown"
|
18
|
+
:pathControls="true"
|
19
|
+
ref="flatmap"
|
20
|
+
@ready="flatmapReadyCall"
|
21
|
+
:displayMinimap="false"
|
22
|
+
:displayWarning="true"
|
23
|
+
:enableOpenMapUI="true"
|
24
|
+
:flatmapAPI="flatmapAPI"
|
25
|
+
:sparcAPI="apiLocation"
|
26
|
+
@open-map="openMap"
|
27
|
+
@pathway-selection-changed="onPathwaySelectionChanged"
|
28
|
+
/>
|
29
|
+
|
30
|
+
<HelpModeDialog
|
31
|
+
v-if="helpMode && useHelpModeDialog"
|
32
|
+
ref="flatmapHelp"
|
33
|
+
:flatmapRef="flatmapRef"
|
34
|
+
:lastItem="helpModeLastItem"
|
35
|
+
@show-next="onHelpModeShowNext"
|
36
|
+
@finish-help-mode="onFinishHelpMode"
|
37
|
+
/>
|
38
|
+
</div>
|
22
39
|
</template>
|
23
40
|
|
24
41
|
<script>
|
25
42
|
/* eslint-disable no-alert, no-console */
|
26
|
-
import { FlatmapVuer } from "@abi-software/flatmapvuer";
|
43
|
+
import { FlatmapVuer, HelpModeDialog } from "@abi-software/flatmapvuer";
|
44
|
+
import Tagging from '../../services/tagging.js';
|
27
45
|
import EventBus from "../EventBus";
|
28
46
|
import ContentMixin from "../../mixins/ContentMixin";
|
29
47
|
import DynamicMarkerMixin from "../../mixins/DynamicMarkerMixin";
|
@@ -35,6 +53,7 @@ export default {
|
|
35
53
|
mixins: [ ContentMixin, DynamicMarkerMixin ],
|
36
54
|
components: {
|
37
55
|
FlatmapVuer,
|
56
|
+
HelpModeDialog,
|
38
57
|
},
|
39
58
|
methods: {
|
40
59
|
getState: function () {
|
@@ -47,11 +66,12 @@ export default {
|
|
47
66
|
return this.$refs.flatmap.searchAndShowResult(term);
|
48
67
|
},
|
49
68
|
getFlatmapImp() {
|
50
|
-
return this.$refs.flatmap
|
69
|
+
return this.$refs.flatmap?.mapImp;
|
51
70
|
},
|
52
71
|
flatmaprResourceSelected: function (type, resource) {
|
53
72
|
this.resourceSelected(
|
54
|
-
type, resource, (this.$refs.
|
73
|
+
type, resource, (this.$refs.flatmap.viewingMode === "Exploration"));
|
74
|
+
|
55
75
|
if (resource.eventType === 'click' && resource.feature.type === 'feature') {
|
56
76
|
const eventData = {
|
57
77
|
label: resource.label || '',
|
@@ -66,7 +86,7 @@ export default {
|
|
66
86
|
'event': 'interaction_event',
|
67
87
|
'event_name': 'portal_maps_connectivity',
|
68
88
|
'category': paramString,
|
69
|
-
"location": type + ' ' + this.$refs.
|
89
|
+
"location": type + ' ' + this.$refs.flatmap.viewingMode
|
70
90
|
});
|
71
91
|
}
|
72
92
|
},
|
@@ -142,7 +162,7 @@ export default {
|
|
142
162
|
mounted: function() {
|
143
163
|
this.getAvailableTerms();
|
144
164
|
EventBus.on("markerUpdate", () => {
|
145
|
-
this.
|
165
|
+
this.flatmapMarkerZoomUpdate(true, undefined);
|
146
166
|
});
|
147
167
|
},
|
148
168
|
};
|
@@ -150,6 +170,11 @@ export default {
|
|
150
170
|
|
151
171
|
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
152
172
|
<style scoped lang="scss">
|
173
|
+
.viewer-container {
|
174
|
+
width: 100%;
|
175
|
+
height: 100%;
|
176
|
+
}
|
177
|
+
|
153
178
|
:deep(.maplibregl-popup) {
|
154
179
|
z-index: 3;
|
155
180
|
}
|
@@ -1,31 +1,48 @@
|
|
1
1
|
<template>
|
2
|
-
<
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
2
|
+
<div class="viewer-container">
|
3
|
+
<MultiFlatmapVuer
|
4
|
+
:availableSpecies="availableSpecies"
|
5
|
+
@flatmapChanged="flatmapChanged"
|
6
|
+
@ready="multiFlatmapReady"
|
7
|
+
:state="entry.state"
|
8
|
+
@resource-selected="flatmaprResourceSelected(entry.type, $event)"
|
9
|
+
style="height: 100%; width: 100%"
|
10
|
+
:initial="entry.resource"
|
11
|
+
:helpMode="helpMode"
|
12
|
+
:helpModeActiveItem="helpModeActiveItem"
|
13
|
+
:helpModeDialog="useHelpModeDialog"
|
14
|
+
@help-mode-last-item="onHelpModeLastItem"
|
15
|
+
@shown-tooltip="onTooltipShown"
|
16
|
+
@shown-map-tooltip="onMapTooltipShown"
|
17
|
+
ref="multiflatmap"
|
18
|
+
:displayMinimap="true"
|
19
|
+
:showStarInLegend="showStarInLegend"
|
20
|
+
:enableOpenMapUI="true"
|
21
|
+
:openMapOptions="openMapOptions"
|
22
|
+
:flatmapAPI="flatmapAPI"
|
23
|
+
:sparcAPI="apiLocation"
|
24
|
+
@pan-zoom-callback="flatmapPanZoomCallback"
|
25
|
+
@open-map="openMap"
|
26
|
+
@finish-help-mode="endHelp"
|
27
|
+
@pathway-selection-changed="onPathwaySelectionChanged"
|
28
|
+
@open-pubmed-url="onOpenPubmedUrl"
|
29
|
+
/>
|
30
|
+
|
31
|
+
<HelpModeDialog
|
32
|
+
v-if="helpMode && useHelpModeDialog"
|
33
|
+
ref="multiflatmapHelp"
|
34
|
+
:multiflatmapRef="multiflatmapRef"
|
35
|
+
:lastItem="helpModeLastItem"
|
36
|
+
@show-next="onHelpModeShowNext"
|
37
|
+
@finish-help-mode="onFinishHelpMode"
|
38
|
+
/>
|
39
|
+
</div>
|
23
40
|
</template>
|
24
41
|
|
25
42
|
<script>
|
26
43
|
/* eslint-disable no-alert, no-console */
|
27
44
|
import Tagging from '../../services/tagging.js';
|
28
|
-
import { MultiFlatmapVuer } from "@abi-software/flatmapvuer";
|
45
|
+
import { MultiFlatmapVuer, HelpModeDialog } from "@abi-software/flatmapvuer";
|
29
46
|
import ContentMixin from "../../mixins/ContentMixin";
|
30
47
|
import EventBus from "../EventBus";
|
31
48
|
import {
|
@@ -73,6 +90,7 @@ export default {
|
|
73
90
|
mixins: [ContentMixin, DyncamicMarkerMixin],
|
74
91
|
components: {
|
75
92
|
MultiFlatmapVuer,
|
93
|
+
HelpModeDialog,
|
76
94
|
},
|
77
95
|
data: function () {
|
78
96
|
return {
|
@@ -137,6 +155,7 @@ export default {
|
|
137
155
|
payload: payload,
|
138
156
|
type: this.entry.type,
|
139
157
|
};
|
158
|
+
this.flatmapMarkerZoomUpdate(false, undefined);
|
140
159
|
this.$emit("resource-selected", result);
|
141
160
|
}
|
142
161
|
},
|
@@ -226,6 +245,7 @@ export default {
|
|
226
245
|
this.$refs.multiflatmap
|
227
246
|
.getCurrentFlatmap()
|
228
247
|
.mapImp.panZoomTo(origin, [sW, sH]);
|
248
|
+
this.flatmapMarkerZoomUpdate(false, undefined);
|
229
249
|
}
|
230
250
|
}
|
231
251
|
},
|
@@ -302,12 +322,12 @@ export default {
|
|
302
322
|
flatmap.enablePanZoomEvents(true); // Use zoom events for dynamic markers
|
303
323
|
this.flatmapReady = true;
|
304
324
|
const flatmapImp = flatmap.mapImp;
|
305
|
-
this.
|
325
|
+
this.flatmapMarkerZoomUpdate(true, flatmapImp);
|
306
326
|
this.updateProvCard();
|
307
327
|
}
|
308
328
|
},
|
309
329
|
getFlatmapImp: function () {
|
310
|
-
if (this.entry.type === "MultiFlatmap" && this.flatmapReady) {
|
330
|
+
if (this.entry.type === "MultiFlatmap" && this.flatmapReady && this.$refs.multiflatmap) {
|
311
331
|
return this.$refs.multiflatmap.getCurrentFlatmap()["mapImp"];
|
312
332
|
} else {
|
313
333
|
return undefined;
|
@@ -364,7 +384,7 @@ export default {
|
|
364
384
|
const markerIdentifier = flatmapImp.addMarker(marker, {
|
365
385
|
element: wrapperElement,
|
366
386
|
className: "highlight-marker",
|
367
|
-
cluster: false
|
387
|
+
cluster: false
|
368
388
|
});
|
369
389
|
|
370
390
|
// update the store with the marker identifier
|
@@ -403,7 +423,7 @@ export default {
|
|
403
423
|
this.getFeaturedDatasets();
|
404
424
|
|
405
425
|
EventBus.on("markerUpdate", () => {
|
406
|
-
this.
|
426
|
+
this.flatmapMarkerZoomUpdate(true, undefined);
|
407
427
|
});
|
408
428
|
},
|
409
429
|
};
|
@@ -412,6 +432,11 @@ export default {
|
|
412
432
|
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
413
433
|
<style scoped lang="scss">
|
414
434
|
|
435
|
+
.viewer-container {
|
436
|
+
width: 100%;
|
437
|
+
height: 100%;
|
438
|
+
}
|
439
|
+
|
415
440
|
:deep(.maplibregl-popup) {
|
416
441
|
z-index: 3;
|
417
442
|
}
|
@@ -421,12 +446,6 @@ export default {
|
|
421
446
|
cursor: pointer !important;
|
422
447
|
z-index: 2;
|
423
448
|
}
|
424
|
-
&.hovered {
|
425
|
-
div {
|
426
|
-
scale: 2;
|
427
|
-
transform: translate(0px, -5px);
|
428
|
-
}
|
429
|
-
}
|
430
449
|
&.highlight-marker {
|
431
450
|
visibility: visible !important;
|
432
451
|
cursor: pointer !important;
|
@@ -436,6 +455,14 @@ export default {
|
|
436
455
|
transform: translate(45px, -7px);
|
437
456
|
}
|
438
457
|
}
|
458
|
+
&.hovered-marker {
|
459
|
+
cursor: pointer !important;
|
460
|
+
z-index: 2;
|
461
|
+
div {
|
462
|
+
scale: 2;
|
463
|
+
transform: translate(0px, -5px);
|
464
|
+
}
|
465
|
+
}
|
439
466
|
}
|
440
467
|
|
441
468
|
</style>
|
@@ -1,33 +1,49 @@
|
|
1
1
|
<template>
|
2
|
-
<
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
2
|
+
<div class="viewer-container">
|
3
|
+
<ScaffoldVuer
|
4
|
+
:state="entry.state"
|
5
|
+
:url="entry.resource"
|
6
|
+
:region="entry.region"
|
7
|
+
@scaffold-selected="resourceSelected(entry.type, $event, true)"
|
8
|
+
@scaffold-highlighted="scaffoldHighlighted(entry.type, $event)"
|
9
|
+
@scaffold-navigated="scaffoldNavigated(entry.type, $event)"
|
10
|
+
@on-ready="scaffoldIsReady"
|
11
|
+
@open-map="openMap"
|
12
|
+
ref="scaffold"
|
13
|
+
:background-toggle="true"
|
14
|
+
:traditional="true"
|
15
|
+
:helpMode="helpMode"
|
16
|
+
:helpModeActiveItem="helpModeActiveItem"
|
17
|
+
:helpModeDialog="useHelpModeDialog"
|
18
|
+
@help-mode-last-item="onHelpModeLastItem"
|
19
|
+
@shown-tooltip="onTooltipShown"
|
20
|
+
@shown-map-tooltip="onMapTooltipShown"
|
21
|
+
:render="visible"
|
22
|
+
:display-latest-message="true"
|
23
|
+
:warning-message="warningMessage"
|
24
|
+
:display-minimap="false"
|
25
|
+
:display-markers="false"
|
26
|
+
:enableOpenMapUI="true"
|
27
|
+
:view-u-r-l="entry.viewUrl"
|
28
|
+
:markerLabels="markerLabels"
|
29
|
+
:flatmapAPI="flatmapAPI"
|
30
|
+
/>
|
31
|
+
|
32
|
+
<HelpModeDialog
|
33
|
+
v-if="helpMode && useHelpModeDialog"
|
34
|
+
ref="scaffoldHelp"
|
35
|
+
:scaffoldRef="scaffoldRef"
|
36
|
+
:lastItem="helpModeLastItem"
|
37
|
+
@show-next="onHelpModeShowNext"
|
38
|
+
@finish-help-mode="onFinishHelpMode"
|
39
|
+
/>
|
40
|
+
</div>
|
25
41
|
</template>
|
26
42
|
|
27
43
|
<script>
|
28
44
|
/* eslint-disable no-alert, no-console */
|
29
45
|
import EventBus from "../EventBus";
|
30
|
-
import { ScaffoldVuer } from "@abi-software/scaffoldvuer";
|
46
|
+
import { ScaffoldVuer, HelpModeDialog } from "@abi-software/scaffoldvuer";
|
31
47
|
import ContentMixin from "../../mixins/ContentMixin";
|
32
48
|
|
33
49
|
import "@abi-software/scaffoldvuer/dist/style.css";
|
@@ -37,6 +53,7 @@ export default {
|
|
37
53
|
mixins: [ ContentMixin ],
|
38
54
|
components: {
|
39
55
|
ScaffoldVuer,
|
56
|
+
HelpModeDialog,
|
40
57
|
},
|
41
58
|
methods: {
|
42
59
|
onResize: function () {
|
@@ -191,6 +208,11 @@ export default {
|
|
191
208
|
</script>
|
192
209
|
|
193
210
|
<style scoped lang="scss">
|
211
|
+
.viewer-container {
|
212
|
+
width: 100%;
|
213
|
+
height: 100%;
|
214
|
+
}
|
215
|
+
|
194
216
|
:deep(.message-popper) {
|
195
217
|
white-space: unset;
|
196
218
|
max-width: 200px;
|