@abi-software/scaffoldvuer 2.0.1 → 2.1.1-demo.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/scaffoldvuer.js +8742 -8823
- package/dist/scaffoldvuer.umd.cjs +35 -35
- package/dist/style.css +1 -1
- package/package.json +3 -3
- package/src/App.vue +16 -48
- package/src/components/ScaffoldVuer.vue +192 -294
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<scaffold-overlay
|
|
3
3
|
ref="scaffoldContainer"
|
|
4
|
+
data-help-scope
|
|
4
5
|
v-loading="loading"
|
|
5
6
|
class="scaffold-container"
|
|
6
7
|
element-loading-text="Loading..."
|
|
@@ -40,16 +41,15 @@
|
|
|
40
41
|
:toolbarOptions="toolbarOptions"
|
|
41
42
|
:activeDrawTool="activeDrawTool"
|
|
42
43
|
:activeDrawMode="activeDrawMode"
|
|
43
|
-
:hoverVisibilities="hoverVisibilities"
|
|
44
44
|
@clickToolbar="toggleDrawing"
|
|
45
|
-
@showTooltip="showHelpText"
|
|
46
|
-
@hideTooltip="hideHelpText"
|
|
47
45
|
ref="toolbarPopover"
|
|
48
46
|
/>
|
|
49
47
|
<el-popover
|
|
50
48
|
v-if="displayWarning"
|
|
51
49
|
ref="warningPopover"
|
|
52
|
-
|
|
50
|
+
trigger="hover"
|
|
51
|
+
:show-after="tooltipDelay"
|
|
52
|
+
:hide-after="tooltipDelay"
|
|
53
53
|
:content="warningMessage"
|
|
54
54
|
placement="right"
|
|
55
55
|
width="max-content"
|
|
@@ -60,8 +60,13 @@
|
|
|
60
60
|
<div
|
|
61
61
|
v-if="displayWarning"
|
|
62
62
|
class="message-icon warning-icon control-layer"
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
v-help-mode="{
|
|
64
|
+
id: 'scaffold-warning',
|
|
65
|
+
area: 'map-info',
|
|
66
|
+
title: 'About this scaffold',
|
|
67
|
+
description: warningMessage,
|
|
68
|
+
placement: 'right',
|
|
69
|
+
}"
|
|
65
70
|
>
|
|
66
71
|
<el-icon><el-icon-warning-filled /></el-icon>
|
|
67
72
|
<span class="message-text">Beta</span>
|
|
@@ -70,11 +75,12 @@
|
|
|
70
75
|
</el-popover>
|
|
71
76
|
<el-popover
|
|
72
77
|
v-if="displayLatestChanges"
|
|
73
|
-
:
|
|
78
|
+
:show-after="tooltipDelay"
|
|
79
|
+
:hide-after="tooltipDelay"
|
|
74
80
|
:content="latestChangesMessage"
|
|
75
81
|
placement="right"
|
|
76
82
|
:teleported="false"
|
|
77
|
-
trigger="
|
|
83
|
+
trigger="hover"
|
|
78
84
|
popper-class="scaffold-popper message-popper right-popper non-selectable"
|
|
79
85
|
ref="whatsNewPopover"
|
|
80
86
|
>
|
|
@@ -82,50 +88,51 @@
|
|
|
82
88
|
<div
|
|
83
89
|
v-if="displayLatestChanges && latestChangesMessage"
|
|
84
90
|
class="el-icon-warning message-icon latest-changesicon control-layer"
|
|
85
|
-
|
|
86
|
-
|
|
91
|
+
v-help-mode="{
|
|
92
|
+
id: 'scaffold-whats-new',
|
|
93
|
+
area: 'map-info',
|
|
94
|
+
title: 'What\'s new?',
|
|
95
|
+
description: latestChangesMessage,
|
|
96
|
+
placement: 'right',
|
|
97
|
+
}"
|
|
87
98
|
>
|
|
88
99
|
<el-icon><el-icon-warning-filled /></el-icon>
|
|
89
100
|
<span class="message-text">What's new?</span>
|
|
90
101
|
</div>
|
|
91
102
|
</template>
|
|
92
103
|
</el-popover>
|
|
93
|
-
<
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
104
|
+
<ScaffoldTreeControls
|
|
105
|
+
class="control-layer"
|
|
106
|
+
ref="scaffoldTreeControls"
|
|
107
|
+
v-help-mode="{
|
|
108
|
+
id: 'scaffold-regions',
|
|
109
|
+
area: 'legends',
|
|
110
|
+
title: 'Regions',
|
|
111
|
+
description:
|
|
112
|
+
'Show or hide the regions of the scaffold using the checkboxes. Click on a region name to select it.',
|
|
113
|
+
placement: 'right',
|
|
114
|
+
onEnter: openHelpModeRegions,
|
|
115
|
+
}"
|
|
116
|
+
:isReady="isReady"
|
|
117
|
+
:containerHeight="clientHeight"
|
|
118
|
+
:show-colour-picker="enableColourPicker"
|
|
119
|
+
@object-selected="objectSelected"
|
|
120
|
+
@object-hovered="objectHovered"
|
|
121
|
+
@drawer-toggled="drawerToggled"
|
|
122
|
+
@check-changed="$emit('check-changed', $event)"
|
|
102
123
|
>
|
|
103
|
-
<template
|
|
104
|
-
<
|
|
124
|
+
<template v-slot:treeSlot>
|
|
125
|
+
<slot name="treeSlot"></slot>
|
|
126
|
+
<primitive-controls
|
|
105
127
|
class="control-layer"
|
|
106
|
-
ref="
|
|
107
|
-
:
|
|
108
|
-
:
|
|
109
|
-
:
|
|
110
|
-
@
|
|
111
|
-
|
|
112
|
-
@drawer-toggled="drawerToggled"
|
|
113
|
-
@check-changed="$emit('check-changed', $event)"
|
|
114
|
-
>
|
|
115
|
-
<template v-slot:treeSlot>
|
|
116
|
-
<slot name="treeSlot"></slot>
|
|
117
|
-
<primitive-controls
|
|
118
|
-
class="control-layer"
|
|
119
|
-
ref="primitiveControls"
|
|
120
|
-
:createData="createData"
|
|
121
|
-
:viewingMode="viewingMode"
|
|
122
|
-
:usageConfig="usageConfig"
|
|
123
|
-
@primitivesUpdated="primitivesUpdated"
|
|
124
|
-
/>
|
|
125
|
-
</template>
|
|
126
|
-
</ScaffoldTreeControls>
|
|
128
|
+
ref="primitiveControls"
|
|
129
|
+
:createData="createData"
|
|
130
|
+
:viewingMode="viewingMode"
|
|
131
|
+
:usageConfig="usageConfig"
|
|
132
|
+
@primitivesUpdated="primitivesUpdated"
|
|
133
|
+
/>
|
|
127
134
|
</template>
|
|
128
|
-
</
|
|
135
|
+
</ScaffoldTreeControls>
|
|
129
136
|
<!--
|
|
130
137
|
<div class="primitive-controls-box">
|
|
131
138
|
|
|
@@ -139,97 +146,91 @@
|
|
|
139
146
|
/>
|
|
140
147
|
</div>
|
|
141
148
|
-->
|
|
142
|
-
<
|
|
149
|
+
<div
|
|
143
150
|
v-if="timeVarying"
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
151
|
+
class="time-slider-container control-layer"
|
|
152
|
+
v-help-mode="{
|
|
153
|
+
id: 'scaffold-slider',
|
|
154
|
+
area: 'animation',
|
|
155
|
+
title: 'Animation',
|
|
156
|
+
description: 'Play or move the slider to animate the scaffold over time.',
|
|
157
|
+
placement: 'top',
|
|
158
|
+
}"
|
|
159
|
+
:class="[minimisedSlider ? 'minimised' : '', sliderPosition]"
|
|
152
160
|
>
|
|
153
|
-
<
|
|
154
|
-
<
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
161
|
+
<el-tabs type="card">
|
|
162
|
+
<el-tab-pane label="Animate scaffold">
|
|
163
|
+
<el-row class="tab-content">
|
|
164
|
+
<map-svg-icon
|
|
165
|
+
v-if="isPlaying"
|
|
166
|
+
icon="pause"
|
|
167
|
+
class="icon-button video-button"
|
|
168
|
+
@click="play(false)"
|
|
169
|
+
/>
|
|
170
|
+
<map-svg-icon
|
|
171
|
+
v-else
|
|
172
|
+
icon="play"
|
|
173
|
+
class="video-button icon-button"
|
|
174
|
+
@click="play(true)"
|
|
175
|
+
/>
|
|
176
|
+
<el-slider
|
|
177
|
+
:min="0"
|
|
178
|
+
:max="timeMax"
|
|
179
|
+
:model-value="(currentTime / 100) * timeMax"
|
|
180
|
+
:step="0.1"
|
|
181
|
+
tooltip-class="time-slider-tooltip"
|
|
182
|
+
class="slider"
|
|
183
|
+
:format-tooltip="formatTooltip"
|
|
184
|
+
:marks="timeStamps"
|
|
185
|
+
@input="timeChange($event)"
|
|
186
|
+
/>
|
|
187
|
+
</el-row>
|
|
188
|
+
</el-tab-pane>
|
|
189
|
+
<el-tab-pane label="Animation data">
|
|
190
|
+
<el-row class="tab-content">
|
|
191
|
+
<div class="animation-data">
|
|
192
|
+
Original duration:
|
|
193
|
+
<div class="purple">
|
|
194
|
+
{{ orginalDuration }}
|
|
195
|
+
</div>
|
|
196
|
+
</div>
|
|
197
|
+
<div class="animation-data">
|
|
198
|
+
Animation duration:
|
|
199
|
+
<div class="purple">
|
|
200
|
+
{{ animateDuration }}
|
|
201
|
+
</div>
|
|
202
|
+
</div>
|
|
203
|
+
<div class="animation-data">
|
|
204
|
+
Playback speed
|
|
205
|
+
<el-select
|
|
206
|
+
:teleported="true"
|
|
207
|
+
:model-value="currentSpeed"
|
|
208
|
+
placeholder="Select"
|
|
209
|
+
class="scaffold-select-box speed"
|
|
210
|
+
popper-class="scaffold_viewer_dropdown"
|
|
211
|
+
@change="speedChanged($event)"
|
|
212
|
+
>
|
|
213
|
+
<el-option
|
|
214
|
+
v-for="item in playSpeed"
|
|
215
|
+
:key="item.value"
|
|
216
|
+
:label="item.label"
|
|
217
|
+
:value="item.value"
|
|
184
218
|
/>
|
|
185
|
-
</el-
|
|
186
|
-
</
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
<div class="purple">
|
|
192
|
-
{{ orginalDuration }}
|
|
193
|
-
</div>
|
|
194
|
-
</div>
|
|
195
|
-
<div class="animation-data">
|
|
196
|
-
Animation duration:
|
|
197
|
-
<div class="purple">
|
|
198
|
-
{{ animateDuration }}
|
|
199
|
-
</div>
|
|
200
|
-
</div>
|
|
201
|
-
<div class="animation-data">
|
|
202
|
-
Playback speed
|
|
203
|
-
<el-select
|
|
204
|
-
:teleported="true"
|
|
205
|
-
:model-value="currentSpeed"
|
|
206
|
-
placeholder="Select"
|
|
207
|
-
class="scaffold-select-box speed"
|
|
208
|
-
popper-class="scaffold_viewer_dropdown"
|
|
209
|
-
@change="speedChanged($event)"
|
|
210
|
-
>
|
|
211
|
-
<el-option
|
|
212
|
-
v-for="item in playSpeed"
|
|
213
|
-
:key="item.value"
|
|
214
|
-
:label="item.label"
|
|
215
|
-
:value="item.value"
|
|
216
|
-
/>
|
|
217
|
-
</el-select>
|
|
218
|
-
</div>
|
|
219
|
-
</el-row>
|
|
220
|
-
</el-tab-pane>
|
|
221
|
-
</el-tabs>
|
|
222
|
-
</div>
|
|
223
|
-
</template>
|
|
224
|
-
</el-popover>
|
|
219
|
+
</el-select>
|
|
220
|
+
</div>
|
|
221
|
+
</el-row>
|
|
222
|
+
</el-tab-pane>
|
|
223
|
+
</el-tabs>
|
|
224
|
+
</div>
|
|
225
225
|
<div class="bottom-right-control control-layer">
|
|
226
226
|
<el-popover
|
|
227
|
-
:
|
|
227
|
+
:show-after="tooltipDelay"
|
|
228
|
+
:hide-after="tooltipDelay"
|
|
228
229
|
content="Zoom in"
|
|
229
230
|
width="max-content"
|
|
230
231
|
placement="left"
|
|
231
232
|
:teleported="false"
|
|
232
|
-
trigger="
|
|
233
|
+
trigger="hover"
|
|
233
234
|
popper-class="scaffold-popper left-popper non-selectable"
|
|
234
235
|
ref="zoomInPopover"
|
|
235
236
|
>
|
|
@@ -237,19 +238,25 @@
|
|
|
237
238
|
<map-svg-icon
|
|
238
239
|
icon="zoomIn"
|
|
239
240
|
class="icon-button zoomIn"
|
|
241
|
+
v-help-mode="{
|
|
242
|
+
id: 'scaffold-zoom-in',
|
|
243
|
+
area: 'zoom',
|
|
244
|
+
title: 'Zoom in',
|
|
245
|
+
description: 'Zoom in to see more detail. You can also scroll on the scaffold.',
|
|
246
|
+
placement: 'left',
|
|
247
|
+
}"
|
|
240
248
|
@click="zoomIn()"
|
|
241
|
-
@mouseover="showHelpText(0)"
|
|
242
|
-
@mouseout="hideHelpText(0)"
|
|
243
249
|
/>
|
|
244
250
|
</template>
|
|
245
251
|
</el-popover>
|
|
246
252
|
<el-popover
|
|
247
|
-
:
|
|
253
|
+
:show-after="tooltipDelay"
|
|
254
|
+
:hide-after="tooltipDelay"
|
|
248
255
|
content="Zoom out"
|
|
249
256
|
placement="top-end"
|
|
250
257
|
width="max-content"
|
|
251
258
|
:teleported="false"
|
|
252
|
-
trigger="
|
|
259
|
+
trigger="hover"
|
|
253
260
|
popper-class="scaffold-popper popper-zoomout non-selectable"
|
|
254
261
|
ref="zoomOutPopover"
|
|
255
262
|
>
|
|
@@ -257,17 +264,23 @@
|
|
|
257
264
|
<map-svg-icon
|
|
258
265
|
icon="zoomOut"
|
|
259
266
|
class="icon-button zoomOut"
|
|
267
|
+
v-help-mode="{
|
|
268
|
+
id: 'scaffold-zoom-out',
|
|
269
|
+
area: 'zoom',
|
|
270
|
+
title: 'Zoom out',
|
|
271
|
+
description: 'Zoom out to see more of the scaffold.',
|
|
272
|
+
placement: 'top',
|
|
273
|
+
}"
|
|
260
274
|
@click="zoomOut()"
|
|
261
|
-
@mouseover="showHelpText(1)"
|
|
262
|
-
@mouseout="hideHelpText(1)"
|
|
263
275
|
/>
|
|
264
276
|
</template>
|
|
265
277
|
</el-popover>
|
|
266
278
|
<el-popover
|
|
267
|
-
:
|
|
279
|
+
:show-after="tooltipDelay"
|
|
280
|
+
:hide-after="tooltipDelay"
|
|
268
281
|
placement="top"
|
|
269
282
|
:teleported="false"
|
|
270
|
-
trigger="
|
|
283
|
+
trigger="hover"
|
|
271
284
|
width="max-content"
|
|
272
285
|
popper-class="scaffold-popper non-selectable"
|
|
273
286
|
ref="zoomFitPopover"
|
|
@@ -281,9 +294,14 @@
|
|
|
281
294
|
<map-svg-icon
|
|
282
295
|
icon="fitWindow"
|
|
283
296
|
class="icon-button fitWindow"
|
|
297
|
+
v-help-mode="{
|
|
298
|
+
id: 'scaffold-zoom-fit',
|
|
299
|
+
area: 'zoom',
|
|
300
|
+
title: 'Fit to window',
|
|
301
|
+
description: 'Reset the view so the whole scaffold fits in the window.',
|
|
302
|
+
placement: 'top',
|
|
303
|
+
}"
|
|
284
304
|
@click="fitWindow()"
|
|
285
|
-
@mouseover="showHelpText(2)"
|
|
286
|
-
@mouseout="hideHelpText(2)"
|
|
287
305
|
/>
|
|
288
306
|
</template>
|
|
289
307
|
</el-popover>
|
|
@@ -389,11 +407,12 @@
|
|
|
389
407
|
<div class="settings-group control-layer" :class="{ open: drawerOpen, close: !drawerOpen }">
|
|
390
408
|
<el-row v-if="showOpenMapButton">
|
|
391
409
|
<el-popover
|
|
392
|
-
:
|
|
410
|
+
:show-after="tooltipDelay"
|
|
411
|
+
:hide-after="tooltipDelay"
|
|
393
412
|
content="Open new map"
|
|
394
413
|
placement="right"
|
|
395
414
|
:teleported="false"
|
|
396
|
-
trigger="
|
|
415
|
+
trigger="hover"
|
|
397
416
|
width="max-content"
|
|
398
417
|
popper-class="scaffold-popper right-popper non-selectable"
|
|
399
418
|
ref="openMapPopover"
|
|
@@ -402,32 +421,44 @@
|
|
|
402
421
|
<map-svg-icon
|
|
403
422
|
v-if="enableOpenMapUI && openMapOptions.length > 0"
|
|
404
423
|
ref="openMapRef"
|
|
424
|
+
v-help-mode="{
|
|
425
|
+
id: 'scaffold-open-map',
|
|
426
|
+
area: 'map-settings',
|
|
427
|
+
title: 'Open new map',
|
|
428
|
+
description: 'Open a related map in a new view.',
|
|
429
|
+
placement: 'right',
|
|
430
|
+
}"
|
|
405
431
|
icon="openMap"
|
|
406
432
|
class="icon-button open-map-button"
|
|
407
|
-
@mouseover="showHelpText(3)"
|
|
408
|
-
@mouseout="hideHelpText(3)"
|
|
409
433
|
/>
|
|
410
434
|
</template>
|
|
411
435
|
</el-popover>
|
|
412
436
|
</el-row>
|
|
413
437
|
<el-row v-if="showLocalSettings">
|
|
414
438
|
<el-popover
|
|
415
|
-
:
|
|
439
|
+
:show-after="tooltipDelay"
|
|
440
|
+
:hide-after="tooltipDelay"
|
|
416
441
|
content="Change background color"
|
|
417
442
|
placement="right"
|
|
418
443
|
width="max-content"
|
|
419
444
|
:teleported="false"
|
|
420
|
-
trigger="
|
|
445
|
+
trigger="hover"
|
|
421
446
|
popper-class="scaffold-popper right-popper non-selectable"
|
|
422
447
|
ref="settingsPopover"
|
|
423
448
|
>
|
|
424
449
|
<template #reference>
|
|
425
450
|
<map-svg-icon
|
|
426
451
|
ref="backgroundIconRef"
|
|
452
|
+
v-help-mode="{
|
|
453
|
+
id: 'scaffold-settings',
|
|
454
|
+
area: 'map-settings',
|
|
455
|
+
title: 'Settings',
|
|
456
|
+
description:
|
|
457
|
+
'Change the settings, such as the viewing mode, colours and the background.',
|
|
458
|
+
placement: 'right',
|
|
459
|
+
}"
|
|
427
460
|
icon="changeBckgd"
|
|
428
461
|
class="icon-button"
|
|
429
|
-
@mouseover="showHelpText(4)"
|
|
430
|
-
@mouseout="hideHelpText(4)"
|
|
431
462
|
/>
|
|
432
463
|
</template>
|
|
433
464
|
</el-popover>
|
|
@@ -446,7 +477,7 @@ import { readNIFTIFromSource } from '../scripts/niftiHelper.js';
|
|
|
446
477
|
import ScaffoldTooltip from './ScaffoldTooltip.vue';
|
|
447
478
|
import ScaffoldTreeControls from './ScaffoldTreeControls.vue';
|
|
448
479
|
import { MapSvgIcon, MapSvgSpriteColor } from '@abi-software/svg-sprite';
|
|
449
|
-
import { DrawToolbar } from '@abi-software/map-utilities';
|
|
480
|
+
import { DrawToolbar, collectHelpModeSteps, helpModeDirective } from '@abi-software/map-utilities';
|
|
450
481
|
import '@abi-software/map-utilities/dist/style.css';
|
|
451
482
|
import {
|
|
452
483
|
createNewAnnotationsWithFeatures,
|
|
@@ -491,6 +522,9 @@ export default {
|
|
|
491
522
|
DrawToolbar,
|
|
492
523
|
ScaffoldTreeControls,
|
|
493
524
|
},
|
|
525
|
+
directives: {
|
|
526
|
+
helpMode: helpModeDirective,
|
|
527
|
+
},
|
|
494
528
|
setup(props) {
|
|
495
529
|
let annotator = inject('$annotator');
|
|
496
530
|
if (!annotator) {
|
|
@@ -548,44 +582,6 @@ export default {
|
|
|
548
582
|
type: Boolean,
|
|
549
583
|
default: true,
|
|
550
584
|
},
|
|
551
|
-
/**
|
|
552
|
-
* Use for toggling the help tooltips.
|
|
553
|
-
*/
|
|
554
|
-
helpMode: {
|
|
555
|
-
type: Boolean,
|
|
556
|
-
default: false,
|
|
557
|
-
},
|
|
558
|
-
/**
|
|
559
|
-
* The active item index of help mode.
|
|
560
|
-
*/
|
|
561
|
-
helpModeActiveItem: {
|
|
562
|
-
type: Number,
|
|
563
|
-
default: 0,
|
|
564
|
-
},
|
|
565
|
-
/**
|
|
566
|
-
* The option to use helpModeDialog.
|
|
567
|
-
* On default, `false`, clicking help will show all tooltips.
|
|
568
|
-
* If `true`, clicking help will show the help-mode-dialog.
|
|
569
|
-
*/
|
|
570
|
-
helpModeDialog: {
|
|
571
|
-
type: Boolean,
|
|
572
|
-
default: false,
|
|
573
|
-
},
|
|
574
|
-
/**
|
|
575
|
-
* The last item of help mode.
|
|
576
|
-
*/
|
|
577
|
-
helpModeLastItem: {
|
|
578
|
-
type: Boolean,
|
|
579
|
-
default: false,
|
|
580
|
-
},
|
|
581
|
-
/**
|
|
582
|
-
* The initial index number for help mode tooltips.
|
|
583
|
-
* Set negative (e.g. -1) if there are other tooltips outside of `hoverVisibilities`.
|
|
584
|
-
*/
|
|
585
|
-
helpModeInitialIndex: {
|
|
586
|
-
type: Number,
|
|
587
|
-
default: 0,
|
|
588
|
-
},
|
|
589
585
|
/**
|
|
590
586
|
* Use for show/display beta warning icon.
|
|
591
587
|
*/
|
|
@@ -834,23 +830,8 @@ export default {
|
|
|
834
830
|
*/
|
|
835
831
|
isTransitioning: false,
|
|
836
832
|
tooltipAppendToBody: false,
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
{ value: false, ref: 'zoomOutPopover' }, // 1
|
|
840
|
-
{ value: false, ref: 'zoomFitPopover' }, // 2
|
|
841
|
-
{ value: false, ref: 'openMapPopover' }, // 3
|
|
842
|
-
{ value: false, ref: 'settingsPopover' }, // 4
|
|
843
|
-
{ value: false, ref: 'sliderPopover' }, // 5
|
|
844
|
-
{ value: false, ref: 'regionVisibilityPopover' }, // 6
|
|
845
|
-
{ value: false, ref: 'warningPopover' }, // 7
|
|
846
|
-
{ value: false, ref: 'whatsNewPopover' }, // 8
|
|
847
|
-
{ value: false, refs: 'toolbarPopover', ref: 'editPopover' }, // 9
|
|
848
|
-
{ value: false, refs: 'toolbarPopover', ref: 'pointPopover' }, // 10
|
|
849
|
-
{ value: false, refs: 'toolbarPopover', ref: 'lineStringPopover' }, // 11
|
|
850
|
-
{ value: false, refs: 'toolbarPopover', ref: 'deletePopover' }, // 11
|
|
851
|
-
],
|
|
852
|
-
inHelp: false,
|
|
853
|
-
helpModeActiveIndex: this.helpModeInitialIndex,
|
|
833
|
+
// Delay before showing and hiding the control tooltips
|
|
834
|
+
tooltipDelay: 500,
|
|
854
835
|
loading: false,
|
|
855
836
|
duration: 3000,
|
|
856
837
|
drawerOpen: true,
|
|
@@ -976,19 +957,6 @@ export default {
|
|
|
976
957
|
immediate: true,
|
|
977
958
|
},
|
|
978
959
|
*/
|
|
979
|
-
helpMode: function (newVal, oldVal) {
|
|
980
|
-
if (newVal !== oldVal) {
|
|
981
|
-
this.setHelpMode(newVal);
|
|
982
|
-
}
|
|
983
|
-
},
|
|
984
|
-
helpModeActiveItem: function () {
|
|
985
|
-
// just take the action from helpModeActiveItem
|
|
986
|
-
// work with local value since the indexing is different
|
|
987
|
-
if (this.helpMode) {
|
|
988
|
-
this.helpModeActiveIndex += 1;
|
|
989
|
-
this.setHelpMode(this.helpMode);
|
|
990
|
-
}
|
|
991
|
-
},
|
|
992
960
|
displayMarkers: function (val) {
|
|
993
961
|
this.$module.scene.displayMarkers = val;
|
|
994
962
|
//Update pickable objects
|
|
@@ -1047,8 +1015,6 @@ export default {
|
|
|
1047
1015
|
this.toggleRendering(this.render);
|
|
1048
1016
|
this.clientHeight = this.$refs.scaffoldContainer.$el.clientHeight;
|
|
1049
1017
|
this.ro = new ResizeObserver(this.adjustLayout).observe(this.$refs.scaffoldContainer.$el);
|
|
1050
|
-
this.helpTextWait = [];
|
|
1051
|
-
this.helpTextWait.length = this.hoverVisibilities.length;
|
|
1052
1018
|
this.defaultRate = this.$module.getPlayRate();
|
|
1053
1019
|
this.$module.zincRenderer.addPreRenderCallbackFunction(() => {
|
|
1054
1020
|
this.currentTime = this.$module.getCurrentTime();
|
|
@@ -2319,60 +2285,19 @@ export default {
|
|
|
2319
2285
|
},
|
|
2320
2286
|
/**
|
|
2321
2287
|
* @public
|
|
2322
|
-
* Function to
|
|
2288
|
+
* Function to get the help mode steps of this scaffold, from the elements with ``v-help-mode``,
|
|
2289
|
+
* to be used with ``HelpModeTour`` and ``HelpModeHover`` from ``@abi-software/map-utilities``.
|
|
2290
|
+
* @returns {Array} The list of help steps.
|
|
2323
2291
|
*/
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
if (!popoverRef) {
|
|
2335
|
-
// skip the unavailable tooltips
|
|
2336
|
-
this.helpModeActiveIndex += 1;
|
|
2337
|
-
}
|
|
2338
|
-
}
|
|
2339
|
-
|
|
2340
|
-
if (!helpMode) {
|
|
2341
|
-
// reset to iniital state
|
|
2342
|
-
this.helpModeActiveIndex = this.helpModeInitialIndex;
|
|
2343
|
-
}
|
|
2344
|
-
|
|
2345
|
-
if (helpMode && this.helpModeActiveIndex >= lastIndex) {
|
|
2346
|
-
/**
|
|
2347
|
-
* This event is emitted when the tooltips in help mode reach the last item.
|
|
2348
|
-
*/
|
|
2349
|
-
this.$emit('help-mode-last-item', true);
|
|
2350
|
-
}
|
|
2351
|
-
|
|
2352
|
-
if (helpMode && !this.helpModeDialog) {
|
|
2353
|
-
this.inHelp = true;
|
|
2354
|
-
this.hoverVisibilities.forEach((item) => {
|
|
2355
|
-
item.value = true;
|
|
2356
|
-
});
|
|
2357
|
-
} else if (helpMode && this.helpModeDialog && toolTipsLength > this.helpModeActiveIndex) {
|
|
2358
|
-
// Show the map tooltip as first item
|
|
2359
|
-
if (this.helpModeActiveIndex > -1) {
|
|
2360
|
-
// wait for CSS transition
|
|
2361
|
-
setTimeout(() => {
|
|
2362
|
-
this.inHelp = false;
|
|
2363
|
-
this.hoverVisibilities.forEach((item) => {
|
|
2364
|
-
item.value = false;
|
|
2365
|
-
});
|
|
2366
|
-
|
|
2367
|
-
this.showHelpText(this.helpModeActiveIndex, 200);
|
|
2368
|
-
}, 300);
|
|
2369
|
-
}
|
|
2370
|
-
} else {
|
|
2371
|
-
this.inHelp = false;
|
|
2372
|
-
this.hoverVisibilities.forEach((item) => {
|
|
2373
|
-
item.value = false;
|
|
2374
|
-
});
|
|
2375
|
-
}
|
|
2292
|
+
getHelpModeSteps: function () {
|
|
2293
|
+
return collectHelpModeSteps(this.$el);
|
|
2294
|
+
},
|
|
2295
|
+
/**
|
|
2296
|
+
* Open the regions drawer to show its help.
|
|
2297
|
+
*/
|
|
2298
|
+
openHelpModeRegions: function () {
|
|
2299
|
+
const treeControls = this.$refs.scaffoldTreeControls;
|
|
2300
|
+
if (treeControls && !treeControls.drawerOpen) treeControls.toggleDrawer();
|
|
2376
2301
|
},
|
|
2377
2302
|
/**
|
|
2378
2303
|
* Callback function used by showRegionTooltip in the case when the tooltip
|
|
@@ -2769,33 +2694,6 @@ export default {
|
|
|
2769
2694
|
}
|
|
2770
2695
|
}
|
|
2771
2696
|
},
|
|
2772
|
-
/**
|
|
2773
|
-
* This is called when mouse cursor enters supported elements
|
|
2774
|
-
* with help tootltips.
|
|
2775
|
-
*/
|
|
2776
|
-
showHelpText: function (helpTextNumber, timeout = 500) {
|
|
2777
|
-
if (!this.inHelp) {
|
|
2778
|
-
clearTimeout(this.helpTextWait[helpTextNumber]);
|
|
2779
|
-
this.helpTextWait[helpTextNumber] = setTimeout(() => {
|
|
2780
|
-
this.hoverVisibilities[helpTextNumber].value = true;
|
|
2781
|
-
/**
|
|
2782
|
-
* This event is emitted after a tooltip in Flatmap is shown.
|
|
2783
|
-
*/
|
|
2784
|
-
this.$emit('shown-tooltip');
|
|
2785
|
-
}, timeout);
|
|
2786
|
-
}
|
|
2787
|
-
},
|
|
2788
|
-
/**
|
|
2789
|
-
* This is called when mouse cursor exits supported element..
|
|
2790
|
-
*/
|
|
2791
|
-
hideHelpText: function (helpTextNumber, timeout = 500) {
|
|
2792
|
-
if (!this.inHelp) {
|
|
2793
|
-
clearTimeout(this.helpTextWait[helpTextNumber]);
|
|
2794
|
-
this.helpTextWait[helpTextNumber] = setTimeout(() => {
|
|
2795
|
-
this.hoverVisibilities[helpTextNumber].value = false;
|
|
2796
|
-
}, timeout);
|
|
2797
|
-
}
|
|
2798
|
-
},
|
|
2799
2697
|
/**
|
|
2800
2698
|
* @public
|
|
2801
2699
|
*
|