@abi-software/flatmapvuer 1.1.0-beta.2 → 1.1.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 +16580 -16118
- package/dist/flatmapvuer.umd.cjs +109 -109
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/src/App.vue +75 -6
- package/src/components/ConnectionDialog.vue +106 -99
- package/src/components/DrawTool.vue +502 -0
- package/src/components/ExternalResourceCard.vue +2 -0
- package/src/components/FlatmapVuer.vue +535 -681
- package/src/components/HelpModeDialog.vue +360 -0
- package/src/components/MultiFlatmapVuer.vue +86 -4
- package/src/components/ProvenancePopup.vue +2 -2
- package/src/components/SelectionsGroup.vue +100 -1
- package/src/components/index.js +2 -1
- package/src/components.d.ts +3 -1
- package/src/icons/yellowstar.js +1 -1
- package/src/services/flatmapQueries.js +0 -1
|
@@ -27,15 +27,15 @@ Please use `const` to assign meaningful names to them...
|
|
|
27
27
|
-->
|
|
28
28
|
<p
|
|
29
29
|
v-if="isLegacy"
|
|
30
|
-
@mouseover="
|
|
31
|
-
@mouseout="
|
|
30
|
+
@mouseover="showTooltip(6)"
|
|
31
|
+
@mouseout="hideTooltip(6)"
|
|
32
32
|
>
|
|
33
33
|
This is a legacy map, you may view the latest map instead.
|
|
34
34
|
</p>
|
|
35
35
|
<p
|
|
36
36
|
v-else-if="isFC"
|
|
37
|
-
@mouseover="
|
|
38
|
-
@mouseout="
|
|
37
|
+
@mouseover="showTooltip(6)"
|
|
38
|
+
@mouseout="hideTooltip(6)"
|
|
39
39
|
>
|
|
40
40
|
This map displays the connectivity of individual neurons.
|
|
41
41
|
Specifically, those which align with (parts of) the neuron
|
|
@@ -54,7 +54,7 @@ Please use `const` to assign meaningful names to them...
|
|
|
54
54
|
SCKAN </a
|
|
55
55
|
>.
|
|
56
56
|
</p>
|
|
57
|
-
<p v-else @mouseover="
|
|
57
|
+
<p v-else @mouseover="showTooltip(6)" @mouseout="hideTooltip(6)">
|
|
58
58
|
This map displays the connectivity of neuron populations.
|
|
59
59
|
Specifically, those from the primarily rat-based
|
|
60
60
|
<a
|
|
@@ -76,8 +76,8 @@ Please use `const` to assign meaningful names to them...
|
|
|
76
76
|
<div
|
|
77
77
|
class="warning-icon"
|
|
78
78
|
v-if="displayWarning"
|
|
79
|
-
@mouseover="
|
|
80
|
-
@mouseout="
|
|
79
|
+
@mouseover="showTooltip(6)"
|
|
80
|
+
@mouseout="hideTooltip(6)"
|
|
81
81
|
>
|
|
82
82
|
<el-icon><el-icon-warning-filled /></el-icon>
|
|
83
83
|
<template v-if="isLegacy">
|
|
@@ -100,13 +100,14 @@ Please use `const` to assign meaningful names to them...
|
|
|
100
100
|
trigger="manual"
|
|
101
101
|
popper-class="warning-popper flatmap-popper"
|
|
102
102
|
:visible="hoverVisibilities[7].value"
|
|
103
|
+
ref="whatsNewPopover"
|
|
103
104
|
>
|
|
104
105
|
<template #reference>
|
|
105
106
|
<div
|
|
106
107
|
class="latest-changesicon"
|
|
107
108
|
v-if="displayLatestChanges"
|
|
108
|
-
@mouseover="
|
|
109
|
-
@mouseout="
|
|
109
|
+
@mouseover="showTooltip(7)"
|
|
110
|
+
@mouseout="hideTooltip(7)"
|
|
110
111
|
>
|
|
111
112
|
<el-icon><el-icon-warning-filled /></el-icon>
|
|
112
113
|
<span class="warning-text">What's new?</span>
|
|
@@ -141,127 +142,24 @@ Please use `const` to assign meaningful names to them...
|
|
|
141
142
|
<el-icon-arrow-down />
|
|
142
143
|
</el-icon>
|
|
143
144
|
|
|
144
|
-
<
|
|
145
|
-
v-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
@mouseout="hideToolitip(10)"
|
|
163
|
-
/>
|
|
164
|
-
</template>
|
|
165
|
-
</el-popover>
|
|
166
|
-
<el-popover
|
|
167
|
-
content="Draw Point"
|
|
168
|
-
placement="top"
|
|
169
|
-
:teleported="false"
|
|
170
|
-
trigger="manual"
|
|
171
|
-
width="80"
|
|
172
|
-
popper-class="flatmap-popper"
|
|
173
|
-
:visible="hoverVisibilities[11].value"
|
|
174
|
-
v-if="drawnType !== 'LineString' && drawnType !== 'Polygon'"
|
|
175
|
-
>
|
|
176
|
-
<template #reference>
|
|
177
|
-
<map-svg-icon
|
|
178
|
-
icon="drawPoint"
|
|
179
|
-
class="icon-button drawPoint"
|
|
180
|
-
@click="drawingEvent('Point')"
|
|
181
|
-
@mouseover="showToolitip(11)"
|
|
182
|
-
@mouseout="hideToolitip(11)"
|
|
183
|
-
/>
|
|
184
|
-
</template>
|
|
185
|
-
</el-popover>
|
|
186
|
-
<el-popover
|
|
187
|
-
content="Draw Line"
|
|
188
|
-
placement="top"
|
|
189
|
-
:teleported="false"
|
|
190
|
-
trigger="manual"
|
|
191
|
-
width="80"
|
|
192
|
-
popper-class="flatmap-popper"
|
|
193
|
-
:visible="hoverVisibilities[12].value"
|
|
194
|
-
v-if="drawnType !== 'Point' && drawnType !== 'Polygon'"
|
|
195
|
-
>
|
|
196
|
-
<template #reference>
|
|
197
|
-
<map-svg-icon
|
|
198
|
-
icon="drawLine"
|
|
199
|
-
class="icon-button drawLineString"
|
|
200
|
-
@click="drawingEvent('LineString')"
|
|
201
|
-
@mouseover="showToolitip(12)"
|
|
202
|
-
@mouseout="hideToolitip(12)"
|
|
203
|
-
/>
|
|
204
|
-
</template>
|
|
205
|
-
</el-popover>
|
|
206
|
-
<el-popover
|
|
207
|
-
content="Draw Polygon"
|
|
208
|
-
placement="top"
|
|
209
|
-
:teleported="false"
|
|
210
|
-
trigger="manual"
|
|
211
|
-
width="80"
|
|
212
|
-
popper-class="flatmap-popper"
|
|
213
|
-
:visible="hoverVisibilities[13].value"
|
|
214
|
-
v-if="drawnType !== 'Point' && drawnType !== 'LineString'"
|
|
215
|
-
>
|
|
216
|
-
<template #reference>
|
|
217
|
-
<map-svg-icon
|
|
218
|
-
icon="drawPolygon"
|
|
219
|
-
class="icon-button drawPolygon"
|
|
220
|
-
@click="drawingEvent('Polygon')"
|
|
221
|
-
@mouseover="showToolitip(13)"
|
|
222
|
-
@mouseout="hideToolitip(13)"
|
|
223
|
-
/>
|
|
224
|
-
</template>
|
|
225
|
-
</el-popover>
|
|
226
|
-
<el-popover
|
|
227
|
-
content="Delete"
|
|
228
|
-
placement="top"
|
|
229
|
-
:teleported="false"
|
|
230
|
-
trigger="manual"
|
|
231
|
-
width="80"
|
|
232
|
-
popper-class="flatmap-popper"
|
|
233
|
-
:visible="hoverVisibilities[14].value"
|
|
234
|
-
>
|
|
235
|
-
<template #reference>
|
|
236
|
-
<map-svg-icon
|
|
237
|
-
icon="drawTrash"
|
|
238
|
-
class="icon-button drawDelete"
|
|
239
|
-
@click="drawingEvent('Delete')"
|
|
240
|
-
@mouseover="showToolitip(14)"
|
|
241
|
-
@mouseout="hideToolitip(14)"
|
|
242
|
-
/>
|
|
243
|
-
</template>
|
|
244
|
-
</el-popover>
|
|
245
|
-
<el-popover
|
|
246
|
-
content="Edit"
|
|
247
|
-
placement="top"
|
|
248
|
-
:teleported="false"
|
|
249
|
-
trigger="manual"
|
|
250
|
-
width="80"
|
|
251
|
-
popper-class="flatmap-popper"
|
|
252
|
-
:visible="hoverVisibilities[15].value"
|
|
253
|
-
>
|
|
254
|
-
<template #reference>
|
|
255
|
-
<map-svg-icon
|
|
256
|
-
icon="comment"
|
|
257
|
-
class="icon-button drawEdit"
|
|
258
|
-
@click="drawingEvent('Edit')"
|
|
259
|
-
@mouseover="showToolitip(15)"
|
|
260
|
-
@mouseout="hideToolitip(15)"
|
|
261
|
-
/>
|
|
262
|
-
</template>
|
|
263
|
-
</el-popover>
|
|
264
|
-
</div>
|
|
145
|
+
<DrawTool
|
|
146
|
+
v-if="viewingMode === 'Annotation' && userInformation && !disableUI"
|
|
147
|
+
:helpMode="helpMode"
|
|
148
|
+
:hoverVisibilities=hoverVisibilities
|
|
149
|
+
:flatmapCanvas="this.$el"
|
|
150
|
+
:drawnType="drawnType"
|
|
151
|
+
:activeDrawTool="activeDrawTool"
|
|
152
|
+
:activeDrawMode="activeDrawMode"
|
|
153
|
+
:drawnCreatedEvent="drawnCreatedEvent"
|
|
154
|
+
:connectionEntry="connectionEntry"
|
|
155
|
+
@drawToolbarEvent="drawToolbarEvent"
|
|
156
|
+
@confirmDrawn="confirmDrawnFeature"
|
|
157
|
+
@cancelDrawn="cancelDrawnFeature"
|
|
158
|
+
@featureTooltip="connectedFeatureTooltip"
|
|
159
|
+
@showTooltip="showTooltip"
|
|
160
|
+
@hideTooltip="hideTooltip"
|
|
161
|
+
ref="drawToolPopover"
|
|
162
|
+
/>
|
|
265
163
|
|
|
266
164
|
<div class="bottom-right-control" v-show="!disableUI">
|
|
267
165
|
<el-popover
|
|
@@ -272,14 +170,15 @@ Please use `const` to assign meaningful names to them...
|
|
|
272
170
|
width="70"
|
|
273
171
|
popper-class="flatmap-popper"
|
|
274
172
|
:visible="hoverVisibilities[0].value"
|
|
173
|
+
ref="zoomInPopover"
|
|
275
174
|
>
|
|
276
175
|
<template #reference>
|
|
277
176
|
<map-svg-icon
|
|
278
177
|
icon="zoomIn"
|
|
279
178
|
class="icon-button zoomIn"
|
|
280
179
|
@click="zoomIn()"
|
|
281
|
-
@mouseover="
|
|
282
|
-
@mouseout="
|
|
180
|
+
@mouseover="showTooltip(0)"
|
|
181
|
+
@mouseout="hideTooltip(0)"
|
|
283
182
|
/>
|
|
284
183
|
</template>
|
|
285
184
|
</el-popover>
|
|
@@ -291,14 +190,15 @@ Please use `const` to assign meaningful names to them...
|
|
|
291
190
|
width="70"
|
|
292
191
|
popper-class="flatmap-popper"
|
|
293
192
|
:visible="hoverVisibilities[1].value"
|
|
193
|
+
ref="zoomOutPopover"
|
|
294
194
|
>
|
|
295
195
|
<template #reference>
|
|
296
196
|
<map-svg-icon
|
|
297
197
|
icon="zoomOut"
|
|
298
198
|
class="icon-button zoomOut"
|
|
299
199
|
@click="zoomOut()"
|
|
300
|
-
@mouseover="
|
|
301
|
-
@mouseout="
|
|
200
|
+
@mouseover="showTooltip(1)"
|
|
201
|
+
@mouseout="hideTooltip(1)"
|
|
302
202
|
/>
|
|
303
203
|
</template>
|
|
304
204
|
</el-popover>
|
|
@@ -310,6 +210,7 @@ Please use `const` to assign meaningful names to them...
|
|
|
310
210
|
width="70"
|
|
311
211
|
popper-class="flatmap-popper"
|
|
312
212
|
:visible="hoverVisibilities[2].value"
|
|
213
|
+
ref="zoomFitPopover"
|
|
313
214
|
>
|
|
314
215
|
<div>
|
|
315
216
|
Fit to
|
|
@@ -321,8 +222,8 @@ Please use `const` to assign meaningful names to them...
|
|
|
321
222
|
icon="fitWindow"
|
|
322
223
|
class="icon-button fitWindow"
|
|
323
224
|
@click="resetView()"
|
|
324
|
-
@mouseover="
|
|
325
|
-
@mouseout="
|
|
225
|
+
@mouseover="showTooltip(2)"
|
|
226
|
+
@mouseout="hideTooltip(2)"
|
|
326
227
|
/>
|
|
327
228
|
</template>
|
|
328
229
|
</el-popover>
|
|
@@ -332,6 +233,7 @@ Please use `const` to assign meaningful names to them...
|
|
|
332
233
|
placement="right"
|
|
333
234
|
:teleported="false"
|
|
334
235
|
trigger="manual"
|
|
236
|
+
:offset="-18"
|
|
335
237
|
popper-class="flatmap-popper"
|
|
336
238
|
:visible="hoverVisibilities[4].value"
|
|
337
239
|
ref="checkBoxPopover"
|
|
@@ -349,31 +251,37 @@ Please use `const` to assign meaningful names to them...
|
|
|
349
251
|
v-popover:checkBoxPopover
|
|
350
252
|
>
|
|
351
253
|
<svg-legends v-if="!isFC" class="svg-legends-container" />
|
|
254
|
+
<template v-if="showStarInLegend">
|
|
352
255
|
<el-popover
|
|
353
256
|
content="Location of the featured dataset"
|
|
354
257
|
placement="right"
|
|
355
|
-
:teleported="
|
|
356
|
-
trigger="
|
|
357
|
-
|
|
258
|
+
:teleported="true"
|
|
259
|
+
trigger="manual"
|
|
260
|
+
width="max-content"
|
|
261
|
+
:offset="-10"
|
|
262
|
+
popper-class="flatmap-popper flatmap-teleport-popper"
|
|
358
263
|
:visible="hoverVisibilities[9].value"
|
|
359
264
|
ref="featuredMarkerPopover"
|
|
360
265
|
>
|
|
361
266
|
<template #reference>
|
|
362
267
|
<div
|
|
363
|
-
v-show="showStarInLegend"
|
|
364
268
|
v-popover:featuredMarkerPopover
|
|
365
269
|
class="yellow-star-legend"
|
|
366
270
|
v-html="yellowstar"
|
|
271
|
+
@mouseover="showTooltip(9)"
|
|
272
|
+
@mouseout="hideTooltip(9)"
|
|
367
273
|
></div>
|
|
368
274
|
</template>
|
|
369
275
|
</el-popover>
|
|
276
|
+
</template>
|
|
370
277
|
<!-- The line below places the yellowstar svg on the left, and the text "Featured markers on the right" with css so they are both centered in the div -->
|
|
371
278
|
<el-popover
|
|
372
279
|
content="Find these markers for data"
|
|
373
280
|
placement="right"
|
|
374
281
|
:teleported="false"
|
|
282
|
+
width="max-content"
|
|
375
283
|
trigger="manual"
|
|
376
|
-
popper-class="flatmap-popper
|
|
284
|
+
popper-class="flatmap-popper"
|
|
377
285
|
:visible="hoverVisibilities[5].value"
|
|
378
286
|
ref="markerPopover"
|
|
379
287
|
>
|
|
@@ -404,6 +312,8 @@ Please use `const` to assign meaningful names to them...
|
|
|
404
312
|
:selections="alertOptions"
|
|
405
313
|
@changed="alertSelected"
|
|
406
314
|
@checkboxMouseEnter="alertMouseEnterEmitted"
|
|
315
|
+
@selections-data-changed="onSelectionsDataChanged"
|
|
316
|
+
@checkAll="checkAllAlerts"
|
|
407
317
|
ref="alertSelection"
|
|
408
318
|
key="alertSelection"
|
|
409
319
|
/>
|
|
@@ -415,6 +325,7 @@ Please use `const` to assign meaningful names to them...
|
|
|
415
325
|
identifierKey="key"
|
|
416
326
|
:selections="sckanDisplay"
|
|
417
327
|
@changed="sckanSelected"
|
|
328
|
+
@selections-data-changed="onSelectionsDataChanged"
|
|
418
329
|
@checkAll="checkAllSCKAN"
|
|
419
330
|
ref="skcanSelection"
|
|
420
331
|
key="skcanSelection"
|
|
@@ -426,6 +337,7 @@ Please use `const` to assign meaningful names to them...
|
|
|
426
337
|
identifierKey="id"
|
|
427
338
|
:selections="layers"
|
|
428
339
|
@changed="layersSelected"
|
|
340
|
+
@selections-data-changed="onSelectionsDataChanged"
|
|
429
341
|
@checkAll="checkAllLayers"
|
|
430
342
|
ref="layersSelection"
|
|
431
343
|
key="layersSelection"
|
|
@@ -439,18 +351,21 @@ Please use `const` to assign meaningful names to them...
|
|
|
439
351
|
colourStyle="line"
|
|
440
352
|
:selections="pathways"
|
|
441
353
|
@changed="pathwaysSelected"
|
|
354
|
+
@selections-data-changed="onSelectionsDataChanged"
|
|
442
355
|
@checkAll="checkAllPathways"
|
|
443
356
|
ref="pathwaysSelection"
|
|
444
357
|
key="pathwaysSelection"
|
|
445
358
|
/>
|
|
446
359
|
<selections-group
|
|
447
360
|
v-if="!isFC && taxonConnectivity && taxonConnectivity.length > 0"
|
|
448
|
-
title="
|
|
361
|
+
title="Studied in"
|
|
449
362
|
labelKey="label"
|
|
450
363
|
identifierKey="taxon"
|
|
364
|
+
helpMessage="Evidence exists that this set of neuron populations have been studied in the given species."
|
|
451
365
|
:selections="taxonConnectivity"
|
|
452
366
|
@changed="taxonsSelected"
|
|
453
367
|
@checkboxMouseEnter="taxonMouseEnterEmitted"
|
|
368
|
+
@selections-data-changed="onSelectionsDataChanged"
|
|
454
369
|
@checkAll="checkAllTaxons"
|
|
455
370
|
ref="taxonSelection"
|
|
456
371
|
key="taxonSelection"
|
|
@@ -462,6 +377,7 @@ Please use `const` to assign meaningful names to them...
|
|
|
462
377
|
identifierKey="key"
|
|
463
378
|
:selections="centreLines"
|
|
464
379
|
@changed="centreLinesSelected"
|
|
380
|
+
@selections-data-changed="onSelectionsDataChanged"
|
|
465
381
|
ref="centrelinesSelection"
|
|
466
382
|
key="centrelinesSelection"
|
|
467
383
|
/>
|
|
@@ -643,6 +559,7 @@ Please use `const` to assign meaningful names to them...
|
|
|
643
559
|
placement="right"
|
|
644
560
|
:teleported="false"
|
|
645
561
|
popper-class="flatmap-popper"
|
|
562
|
+
ref="openMapPopover"
|
|
646
563
|
>
|
|
647
564
|
<template #reference>
|
|
648
565
|
<map-svg-icon
|
|
@@ -650,8 +567,8 @@ Please use `const` to assign meaningful names to them...
|
|
|
650
567
|
ref="openMapRef"
|
|
651
568
|
icon="openMap"
|
|
652
569
|
class="icon-button open-map-button"
|
|
653
|
-
@mouseover="
|
|
654
|
-
@mouseout="
|
|
570
|
+
@mouseover="showTooltip(8)"
|
|
571
|
+
@mouseout="hideTooltip(8)"
|
|
655
572
|
/>
|
|
656
573
|
</template>
|
|
657
574
|
</el-popover>
|
|
@@ -664,14 +581,15 @@ Please use `const` to assign meaningful names to them...
|
|
|
664
581
|
:teleported="false"
|
|
665
582
|
trigger="manual"
|
|
666
583
|
popper-class="flatmap-popper"
|
|
584
|
+
ref="settingsPopover"
|
|
667
585
|
>
|
|
668
586
|
<template #reference>
|
|
669
587
|
<map-svg-icon
|
|
670
588
|
ref="backgroundIconRef"
|
|
671
589
|
icon="changeBckgd"
|
|
672
590
|
class="icon-button"
|
|
673
|
-
@mouseover="
|
|
674
|
-
@mouseout="
|
|
591
|
+
@mouseover="showTooltip(3)"
|
|
592
|
+
@mouseout="hideTooltip(3)"
|
|
675
593
|
/>
|
|
676
594
|
</template>
|
|
677
595
|
</el-popover>
|
|
@@ -686,18 +604,6 @@ Please use `const` to assign meaningful names to them...
|
|
|
686
604
|
:annotationDisplay="viewingMode === 'Annotation'"
|
|
687
605
|
@annotation="commitAnnotationEvent"
|
|
688
606
|
/>
|
|
689
|
-
<ConnectionDialog
|
|
690
|
-
class="connection-dialog"
|
|
691
|
-
v-show="connectionDisplay"
|
|
692
|
-
:entry="connectionEntry"
|
|
693
|
-
:drawing="inDrawing"
|
|
694
|
-
:connection="connection"
|
|
695
|
-
@display="connectionDialogPopup"
|
|
696
|
-
@confirm="confirmDrawnFeature"
|
|
697
|
-
@cancel="cancelDrawnFeature"
|
|
698
|
-
@popup="closePopup"
|
|
699
|
-
@tooltip="displayConnectedFeatureTooltip"
|
|
700
|
-
/>
|
|
701
607
|
</div>
|
|
702
608
|
</div>
|
|
703
609
|
</template>
|
|
@@ -735,59 +641,9 @@ import yellowstar from '../icons/yellowstar'
|
|
|
735
641
|
import ResizeSensor from 'css-element-queries/src/ResizeSensor'
|
|
736
642
|
import * as flatmap from '@abi-software/flatmap-viewer'
|
|
737
643
|
import { AnnotationService } from '@abi-software/sparc-annotation'
|
|
738
|
-
import ConnectionDialog from './ConnectionDialog.vue'
|
|
739
644
|
import { mapState } from 'pinia'
|
|
740
645
|
import { useMainStore } from '@/store/index'
|
|
741
|
-
|
|
742
|
-
/**
|
|
743
|
-
* @param scopeElement Draggable scope area (Optional)
|
|
744
|
-
* @param dragElement Draggable element
|
|
745
|
-
*/
|
|
746
|
-
const draggable = (scopeElement, dragElement) => {
|
|
747
|
-
let startX, startY, clickX, clickY, posX, posY
|
|
748
|
-
// reset position in case previous pupped up dialog is dragged
|
|
749
|
-
dragElement.style.left = ''
|
|
750
|
-
dragElement.style.top = ''
|
|
751
|
-
// const scopeRect = scopeElement.getBoundingClientRect()
|
|
752
|
-
// const dragRect = dragElement.getBoundingClientRect()
|
|
753
|
-
|
|
754
|
-
dragElement.addEventListener('mousedown', (e) => {
|
|
755
|
-
e.preventDefault();
|
|
756
|
-
startX = dragElement.offsetLeft
|
|
757
|
-
startY = dragElement.offsetTop
|
|
758
|
-
clickX = e.clientX
|
|
759
|
-
clickY = e.clientY
|
|
760
|
-
|
|
761
|
-
dragElement.addEventListener('mousemove', drag, false);
|
|
762
|
-
document.addEventListener('mouseup', () => {
|
|
763
|
-
dragElement.removeEventListener('mousemove', drag, false);
|
|
764
|
-
}, false);
|
|
765
|
-
}, false);
|
|
766
|
-
|
|
767
|
-
function drag(e) {
|
|
768
|
-
e.preventDefault();
|
|
769
|
-
posX = startX - (clickX - e.clientX)
|
|
770
|
-
posY = startY - (clickY - e.clientY)
|
|
771
|
-
// if (
|
|
772
|
-
// (posX > scopeRect.left && ((posX + dragRect.width) < scopeRect.right)) &&
|
|
773
|
-
// (posY > scopeRect.top && ((posY + dragRect.height) < scopeRect.bottom))
|
|
774
|
-
// ) {
|
|
775
|
-
dragElement.style.left = `${posX}px`;
|
|
776
|
-
dragElement.style.top = `${posY}px`;
|
|
777
|
-
// } else {
|
|
778
|
-
// if (posX <= scopeRect.left) {
|
|
779
|
-
// dragElement.style.left = '0px';
|
|
780
|
-
// } else if (posX + dragRect.width >= scopeRect.right) {
|
|
781
|
-
// dragElement.style.left = `${scopeRect.right - dragRect.width}px`;
|
|
782
|
-
// }
|
|
783
|
-
// if (posY <= scopeRect.top) {
|
|
784
|
-
// dragElement.style.top = '0px';
|
|
785
|
-
// } else if (posY + dragRect.height >= scopeRect.bottom) {
|
|
786
|
-
// dragElement.style.top = `${scopeRect.bottom - dragRect.height}px`;
|
|
787
|
-
// }
|
|
788
|
-
// }
|
|
789
|
-
}
|
|
790
|
-
}
|
|
646
|
+
import DrawTool from './DrawTool.vue'
|
|
791
647
|
|
|
792
648
|
const centroid = (geometry) => {
|
|
793
649
|
let featureGeometry = { lng: 0, lat: 0, }
|
|
@@ -894,6 +750,7 @@ export default {
|
|
|
894
750
|
ElIconWarningFilled,
|
|
895
751
|
ElIconArrowDown,
|
|
896
752
|
ElIconArrowLeft,
|
|
753
|
+
DrawTool
|
|
897
754
|
},
|
|
898
755
|
beforeCreate: function () {
|
|
899
756
|
this.mapManager = undefined
|
|
@@ -913,20 +770,20 @@ export default {
|
|
|
913
770
|
* Function to initialise drawing.
|
|
914
771
|
*/
|
|
915
772
|
initialiseDrawing: function () {
|
|
916
|
-
this.
|
|
917
|
-
this.initialiseDialog()
|
|
773
|
+
this.connectionEntry = {}
|
|
918
774
|
this.activeDrawTool = undefined
|
|
919
|
-
this.
|
|
775
|
+
this.activeDrawMode = undefined
|
|
776
|
+
this.drawnCreatedEvent = undefined
|
|
920
777
|
},
|
|
921
778
|
/**
|
|
922
779
|
* @vuese
|
|
923
780
|
* Function to cancel a newly drawn feature.
|
|
924
781
|
*/
|
|
925
782
|
cancelDrawnFeature: function () {
|
|
926
|
-
if (this.
|
|
927
|
-
this.
|
|
783
|
+
if (this.drawnCreatedEvent) {
|
|
784
|
+
this.closeTooltip()
|
|
928
785
|
this.annotationEntry = {
|
|
929
|
-
...this.
|
|
786
|
+
...this.drawnCreatedEvent.feature,
|
|
930
787
|
resourceId: this.serverURL,
|
|
931
788
|
}
|
|
932
789
|
this.rollbackAnnotationEvent()
|
|
@@ -938,10 +795,24 @@ export default {
|
|
|
938
795
|
* Function to display connected features' tooltip for drawn connectivity.
|
|
939
796
|
* @arg id
|
|
940
797
|
*/
|
|
941
|
-
|
|
798
|
+
connectedFeatureTooltip: function (value) {
|
|
942
799
|
if (this.mapImp) {
|
|
943
|
-
|
|
944
|
-
|
|
800
|
+
if (value) {
|
|
801
|
+
const numericId = Number(value)
|
|
802
|
+
let payload = { feature: {} }
|
|
803
|
+
if (numericId) {
|
|
804
|
+
const data = this.mapImp.featureProperties(numericId)
|
|
805
|
+
payload.feature = data
|
|
806
|
+
} else {
|
|
807
|
+
const drawnFeature = this.existDrawnFeatures.find(
|
|
808
|
+
(feature) => feature.id === value.replace(' ', '')
|
|
809
|
+
)
|
|
810
|
+
payload.feature.feature = drawnFeature
|
|
811
|
+
}
|
|
812
|
+
this.checkAndCreatePopups(payload)
|
|
813
|
+
} else {
|
|
814
|
+
this.closeTooltip()
|
|
815
|
+
}
|
|
945
816
|
}
|
|
946
817
|
},
|
|
947
818
|
/**
|
|
@@ -949,8 +820,8 @@ export default {
|
|
|
949
820
|
* Function to confirm a newly drawn feature.
|
|
950
821
|
*/
|
|
951
822
|
confirmDrawnFeature: function () {
|
|
952
|
-
if (this.
|
|
953
|
-
this.checkAndCreatePopups(this.
|
|
823
|
+
if (this.drawnCreatedEvent) {
|
|
824
|
+
this.checkAndCreatePopups(this.drawnCreatedEvent)
|
|
954
825
|
// Add connection if exist to annotationEntry
|
|
955
826
|
// Connection will only be added in creating new drawn feature annotation
|
|
956
827
|
// And will not be updated if move drawn features
|
|
@@ -962,70 +833,63 @@ export default {
|
|
|
962
833
|
},
|
|
963
834
|
/**
|
|
964
835
|
* @vuese
|
|
965
|
-
* Function to
|
|
966
|
-
|
|
967
|
-
initialiseDialog: function () {
|
|
968
|
-
this.connectionDisplay = false
|
|
969
|
-
this.connectionEntry = {}
|
|
970
|
-
},
|
|
971
|
-
/**
|
|
972
|
-
* @vuese
|
|
973
|
-
* Function to display the connection dialog after finalising a drawing.
|
|
836
|
+
* Function to process the annotation toolbar click events.
|
|
837
|
+
* @arg type
|
|
974
838
|
*/
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
if (
|
|
979
|
-
this.
|
|
980
|
-
|
|
839
|
+
drawToolbarEvent: function (type) {
|
|
840
|
+
this.closeTooltip()
|
|
841
|
+
this.doubleClickedFeature = false
|
|
842
|
+
if (type === 'Delete') {
|
|
843
|
+
this.activeDrawMode = this.activeDrawMode === 'Delete' ? undefined : 'Delete'
|
|
844
|
+
} else if (type === 'Edit') {
|
|
845
|
+
this.activeDrawMode = this.activeDrawMode === 'Edit' ? undefined : 'Edit'
|
|
846
|
+
} else {
|
|
847
|
+
this.activeDrawTool = type
|
|
848
|
+
}
|
|
849
|
+
if (Object.keys(this.annotationEntry).length > 0 && !this.featureAnnotationSubmitted) {
|
|
850
|
+
this.rollbackAnnotationEvent()
|
|
981
851
|
}
|
|
982
852
|
},
|
|
983
|
-
|
|
853
|
+
/**
|
|
984
854
|
* @vuese
|
|
985
|
-
* Function to
|
|
986
|
-
*
|
|
855
|
+
* Function to fire annotation event based on the provided ``data``.
|
|
856
|
+
* Either edit or delete event.
|
|
857
|
+
* @arg data
|
|
987
858
|
*/
|
|
988
|
-
|
|
989
|
-
this.
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
if (type === 'Point') {
|
|
993
|
-
const point = this.$el.querySelector('.mapbox-gl-draw_point')
|
|
994
|
-
this.$el.querySelector('.mapbox-gl-draw_point').click()
|
|
995
|
-
this.activeDrawTool = point.classList.contains('active') ? 'Point' : undefined
|
|
996
|
-
} else if (type === 'LineString') {
|
|
997
|
-
const line = this.$el.querySelector('.mapbox-gl-draw_line')
|
|
998
|
-
this.$el.querySelector('.mapbox-gl-draw_line').click()
|
|
999
|
-
this.activeDrawTool = line.classList.contains('active') ? 'LineString' : undefined
|
|
1000
|
-
} else if (type === 'Polygon') {
|
|
1001
|
-
const polygon = this.$el.querySelector('.mapbox-gl-draw_polygon')
|
|
1002
|
-
this.$el.querySelector('.mapbox-gl-draw_polygon').click()
|
|
1003
|
-
this.activeDrawTool = polygon.classList.contains('active') ? 'Polygon' : undefined
|
|
1004
|
-
}
|
|
1005
|
-
// disable tool icon click if any mode is on
|
|
1006
|
-
} else if (this.drawModes.includes(type) && !this.activeDrawTool) {
|
|
1007
|
-
if (type === 'Delete') {
|
|
1008
|
-
if (
|
|
1009
|
-
this.currentDrawnFeature &&
|
|
1010
|
-
// For either no mode is on or edit is on
|
|
1011
|
-
(!this.activeDrawMode || this.activeDrawMode === 'Edit')
|
|
1012
|
-
) {
|
|
1013
|
-
// Force simple_select a feature for delete event
|
|
1014
|
-
this.doubleClickedFeature = false
|
|
859
|
+
drawModeEvent: function (data) {
|
|
860
|
+
if (this.activeDrawMode === 'Edit') {
|
|
861
|
+
if (this.doubleClickedFeature) {
|
|
862
|
+
if (data.feature.feature.geometry.type !== 'Point') {
|
|
1015
863
|
this.changeAnnotationDrawMode({
|
|
1016
|
-
mode: '
|
|
1017
|
-
options: {
|
|
864
|
+
mode: 'direct_select',
|
|
865
|
+
options: { featureId: data.feature.feature.id }
|
|
1018
866
|
})
|
|
1019
|
-
this.
|
|
1020
|
-
}
|
|
1021
|
-
this.activeDrawMode = this.activeDrawMode === 'Delete' ? undefined : 'Delete'
|
|
1022
|
-
// clear currentDrawnFeature when quit delete mode
|
|
1023
|
-
if (!this.activeDrawMode) {
|
|
1024
|
-
this.currentDrawnFeature = undefined
|
|
867
|
+
this.modifyAnnotationFeature()
|
|
1025
868
|
}
|
|
1026
|
-
|
|
1027
|
-
|
|
869
|
+
this.doubleClickedFeature = false
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
if (this.activeDrawMode === 'Delete') {
|
|
873
|
+
this.changeAnnotationDrawMode({
|
|
874
|
+
mode: 'simple_select',
|
|
875
|
+
options: { featureIds: [data.feature.feature.id] }
|
|
876
|
+
})
|
|
877
|
+
this.modifyAnnotationFeature()
|
|
878
|
+
}
|
|
879
|
+
},
|
|
880
|
+
/**
|
|
881
|
+
* Function to create connectivity body from existing entries.
|
|
882
|
+
*/
|
|
883
|
+
createConnectivityBody: function () {
|
|
884
|
+
if (Object.keys(this.connectionEntry).length > 0) {
|
|
885
|
+
const features = Object.values(this.connectionEntry)
|
|
886
|
+
const body = {
|
|
887
|
+
type: 'connectivity',
|
|
888
|
+
source: features[0],
|
|
889
|
+
target: features[features.length - 1],
|
|
890
|
+
intermediates: features.filter((f, index) => index !== 0 && index !== features.length - 1),
|
|
1028
891
|
}
|
|
892
|
+
this.annotationEntry.body = body
|
|
1029
893
|
}
|
|
1030
894
|
},
|
|
1031
895
|
/**
|
|
@@ -1045,8 +909,7 @@ export default {
|
|
|
1045
909
|
clearAnnotationFeature: function () {
|
|
1046
910
|
if (
|
|
1047
911
|
this.mapImp &&
|
|
1048
|
-
this.
|
|
1049
|
-
this.drawnAnnotationFeatures.length > 0
|
|
912
|
+
this.existDrawnFeatures.length > 0
|
|
1050
913
|
) {
|
|
1051
914
|
this.mapImp.clearAnnotationFeature()
|
|
1052
915
|
}
|
|
@@ -1056,7 +919,7 @@ export default {
|
|
|
1056
919
|
* Function to fire the ``trash`` action.
|
|
1057
920
|
* See https://github.com/mapbox/mapbox-gl-draw/blob/main/docs/API.md#trash-draw for more details.
|
|
1058
921
|
*/
|
|
1059
|
-
|
|
922
|
+
modifyAnnotationFeature: function () {
|
|
1060
923
|
if (this.mapImp) {
|
|
1061
924
|
// Fire the 'trash' button
|
|
1062
925
|
// Not only use to remove features
|
|
@@ -1072,9 +935,10 @@ export default {
|
|
|
1072
935
|
// For 'updated' and 'deleted' callback
|
|
1073
936
|
if (
|
|
1074
937
|
this.mapImp &&
|
|
1075
|
-
|
|
938
|
+
['created', 'updated', 'deleted'].includes(this.annotationEntry.type)
|
|
1076
939
|
) {
|
|
1077
940
|
this.mapImp.rollbackAnnotationEvent(this.annotationEntry)
|
|
941
|
+
this.annotationEntry = {}
|
|
1078
942
|
}
|
|
1079
943
|
},
|
|
1080
944
|
/**
|
|
@@ -1085,90 +949,82 @@ export default {
|
|
|
1085
949
|
commitAnnotationEvent: function (annotation) {
|
|
1086
950
|
if (
|
|
1087
951
|
this.mapImp &&
|
|
1088
|
-
|
|
952
|
+
['created', 'updated', 'deleted'].includes(this.annotationEntry.type) &&
|
|
1089
953
|
// Only when annotation comments stored successfully
|
|
1090
954
|
annotation
|
|
1091
955
|
) {
|
|
1092
|
-
this.
|
|
956
|
+
this.featureAnnotationSubmitted = true
|
|
1093
957
|
this.mapImp.commitAnnotationEvent(this.annotationEntry)
|
|
1094
|
-
if (this.annotationEntry.type === 'deleted')
|
|
1095
|
-
|
|
1096
|
-
} else {
|
|
1097
|
-
// Use to update 'this.drawnAnnotationFeatures' when created or updated
|
|
1098
|
-
this.addAnnotationFeature()
|
|
1099
|
-
}
|
|
958
|
+
if (this.annotationEntry.type === 'deleted') this.closeTooltip()
|
|
959
|
+
else this.addAnnotationFeature() // Update 'existDrawnFeatures' when created or updated event
|
|
1100
960
|
}
|
|
1101
961
|
},
|
|
962
|
+
/**
|
|
963
|
+
* @vuese
|
|
964
|
+
* Function to fetch annotated item id.
|
|
965
|
+
* @arg userId,
|
|
966
|
+
* @arg participated
|
|
967
|
+
*/
|
|
968
|
+
fetchAnnotatedItemIds: async function (userId = undefined, participated = undefined) {
|
|
969
|
+
let annotatedItemIds = await this.annotator.annotatedItemIds(this.userToken, this.serverURL, userId, participated)
|
|
970
|
+
// The annotator has `resource` and `items` fields
|
|
971
|
+
if ('resource' in annotatedItemIds) annotatedItemIds = annotatedItemIds.itemIds
|
|
972
|
+
return annotatedItemIds
|
|
973
|
+
},
|
|
1102
974
|
/**
|
|
1103
975
|
* @vuese
|
|
1104
976
|
* Function to add existing drawn annotations to flatmap.
|
|
1105
977
|
*/
|
|
1106
|
-
setFeatureAnnotated: function () {
|
|
978
|
+
setFeatureAnnotated: async function () {
|
|
1107
979
|
if (this.mapImp) {
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
980
|
+
const annotatedItemIds = await this.fetchAnnotatedItemIds()
|
|
981
|
+
for (const id of annotatedItemIds) {
|
|
982
|
+
this.mapImp.setFeatureAnnotated(id)
|
|
983
|
+
}
|
|
984
|
+
}
|
|
985
|
+
},
|
|
986
|
+
/**
|
|
987
|
+
* @vuese
|
|
988
|
+
* Function to fetch drawn features.
|
|
989
|
+
* @arg userId,
|
|
990
|
+
* @arg participated
|
|
991
|
+
*/
|
|
992
|
+
fetchDrawnFeatures: async function (userId, participated) {
|
|
993
|
+
const annotatedItemIds = await this.fetchAnnotatedItemIds(userId, participated)
|
|
994
|
+
let drawnFeatures = await this.annotator.drawnFeatures(this.userToken, this.serverURL, annotatedItemIds)
|
|
995
|
+
// The annotator has `resource` and `features` fields
|
|
996
|
+
if ('resource' in drawnFeatures) drawnFeatures = drawnFeatures.features
|
|
997
|
+
// Use to switch the displayed feature type
|
|
998
|
+
if (this.drawnType !== 'All tools') {
|
|
999
|
+
drawnFeatures = drawnFeatures.filter((feature) => {
|
|
1000
|
+
return feature.geometry.type === this.drawnType
|
|
1001
|
+
})
|
|
1121
1002
|
}
|
|
1003
|
+
return drawnFeatures
|
|
1122
1004
|
},
|
|
1123
1005
|
/**
|
|
1124
1006
|
* @vuese
|
|
1125
1007
|
* Function to draw existing drawn annotations based on selector.
|
|
1126
1008
|
*/
|
|
1127
|
-
addAnnotationFeature: function () {
|
|
1009
|
+
addAnnotationFeature: async function () {
|
|
1128
1010
|
if (this.mapImp) {
|
|
1129
|
-
if (!this.
|
|
1011
|
+
if (!this.featureAnnotationSubmitted) this.clearAnnotationFeature()
|
|
1130
1012
|
if (this.drawnType !== 'None') {
|
|
1131
|
-
if (!this.
|
|
1013
|
+
if (!this.featureAnnotationSubmitted) this.loading = true
|
|
1132
1014
|
const userId = this.annotatedType === 'Anyone' ?
|
|
1133
1015
|
undefined : this.userInformation.orcid ?
|
|
1134
1016
|
this.userInformation.orcid : '0000-0000-0000-0000'
|
|
1135
1017
|
const participated = this.annotatedType === 'Anyone' ?
|
|
1136
1018
|
undefined : this.annotatedType === 'Me' ?
|
|
1137
1019
|
true : false
|
|
1138
|
-
this.
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
if ('resource' in drawnFeatures) {
|
|
1147
|
-
// The annotator has `resource` and `features` fields
|
|
1148
|
-
drawnFeatures = drawnFeatures.features
|
|
1149
|
-
}
|
|
1150
|
-
// Use to switch the displayed feature type
|
|
1151
|
-
if (this.drawnType !== 'All tools') {
|
|
1152
|
-
drawnFeatures = drawnFeatures.filter((feature) => {
|
|
1153
|
-
return feature.geometry.type === this.drawnType
|
|
1154
|
-
})
|
|
1155
|
-
}
|
|
1156
|
-
this.drawnAnnotationFeatures = drawnFeatures
|
|
1157
|
-
this.loading = false
|
|
1158
|
-
// No need to call 'addAnnotationFeature' when a new feature created, as it is already on the map
|
|
1159
|
-
if (!this.annotationSubmitted) {
|
|
1160
|
-
for (const feature of drawnFeatures) {
|
|
1161
|
-
this.mapImp.addAnnotationFeature(feature)
|
|
1162
|
-
}
|
|
1163
|
-
}
|
|
1164
|
-
})
|
|
1165
|
-
.catch((reason) => {
|
|
1166
|
-
console.log(reason) // Error!
|
|
1167
|
-
})
|
|
1168
|
-
})
|
|
1169
|
-
.catch((reason) => {
|
|
1170
|
-
console.log(reason) // Error!
|
|
1171
|
-
})
|
|
1020
|
+
const drawnFeatures = await this.fetchDrawnFeatures(userId, participated)
|
|
1021
|
+
this.existDrawnFeatures = drawnFeatures
|
|
1022
|
+
this.loading = false
|
|
1023
|
+
if (!this.featureAnnotationSubmitted) {
|
|
1024
|
+
for (const feature of drawnFeatures) {
|
|
1025
|
+
this.mapImp.addAnnotationFeature(feature)
|
|
1026
|
+
}
|
|
1027
|
+
}
|
|
1172
1028
|
}
|
|
1173
1029
|
}
|
|
1174
1030
|
},
|
|
@@ -1194,6 +1050,7 @@ export default {
|
|
|
1194
1050
|
this.drawnType = flag
|
|
1195
1051
|
if (this.mapImp) {
|
|
1196
1052
|
this.addAnnotationFeature()
|
|
1053
|
+
this.initialiseDrawing()
|
|
1197
1054
|
}
|
|
1198
1055
|
},
|
|
1199
1056
|
/**
|
|
@@ -1378,6 +1235,9 @@ export default {
|
|
|
1378
1235
|
this.mapImp.enableCentrelines(payload.value)
|
|
1379
1236
|
}
|
|
1380
1237
|
},
|
|
1238
|
+
onSelectionsDataChanged: function (data) {
|
|
1239
|
+
this.$emit('pathway-selection-changed', data);
|
|
1240
|
+
},
|
|
1381
1241
|
/**
|
|
1382
1242
|
* // Currently not in use
|
|
1383
1243
|
* Function to show or hide paths valid in SCKAN
|
|
@@ -1420,9 +1280,6 @@ export default {
|
|
|
1420
1280
|
// Check and flatten the origins node graph
|
|
1421
1281
|
let originsFlat = connectivity?.ids?.dendrites?.flat().flat()
|
|
1422
1282
|
|
|
1423
|
-
// Remove the origin nodes from the path features so that we only see downstream nodes
|
|
1424
|
-
pathFeatures = pathFeatures.filter((p) => !originsFlat.includes(p.models))
|
|
1425
|
-
|
|
1426
1283
|
let toHighlight = []
|
|
1427
1284
|
let highlight = false
|
|
1428
1285
|
|
|
@@ -1452,6 +1309,32 @@ export default {
|
|
|
1452
1309
|
this.mapImp.zoomToFeatures(toHighlight, { noZoomIn: true })
|
|
1453
1310
|
}
|
|
1454
1311
|
},
|
|
1312
|
+
resetMapFilter: function() {
|
|
1313
|
+
const alert = this.mapFilters.alert;
|
|
1314
|
+
let filter = undefined;
|
|
1315
|
+
if (alert.with) {
|
|
1316
|
+
if (!alert.without) {
|
|
1317
|
+
filter = {
|
|
1318
|
+
HAS: 'alert',
|
|
1319
|
+
};
|
|
1320
|
+
}
|
|
1321
|
+
} else {
|
|
1322
|
+
if (alert.without) {
|
|
1323
|
+
filter = {
|
|
1324
|
+
NOT: { HAS: 'alert'},
|
|
1325
|
+
};
|
|
1326
|
+
} else {
|
|
1327
|
+
filter = {
|
|
1328
|
+
AND: [ {NOT: { HAS: 'alert'}}, { HAS: 'alert'}]
|
|
1329
|
+
}
|
|
1330
|
+
}
|
|
1331
|
+
}
|
|
1332
|
+
if (filter) {
|
|
1333
|
+
this.mapImp.setVisibilityFilter(filter)
|
|
1334
|
+
} else {
|
|
1335
|
+
this.mapImp.clearVisibilityFilter()
|
|
1336
|
+
}
|
|
1337
|
+
},
|
|
1455
1338
|
/**
|
|
1456
1339
|
* @vuese
|
|
1457
1340
|
* Function to enable/disable mouse enter and leave event for
|
|
@@ -1461,15 +1344,19 @@ export default {
|
|
|
1461
1344
|
alertMouseEnterEmitted: function (payload) {
|
|
1462
1345
|
if (this.mapImp) {
|
|
1463
1346
|
if (payload.value) {
|
|
1464
|
-
|
|
1465
|
-
|
|
1347
|
+
let filter = undefined;
|
|
1348
|
+
if (payload.key === "alert") {
|
|
1349
|
+
filter = {
|
|
1350
|
+
HAS: 'alert',
|
|
1351
|
+
}
|
|
1352
|
+
} else if (payload.key === "withoutAlert") {
|
|
1353
|
+
filter = {
|
|
1354
|
+
NOT: {HAS: 'alert'},
|
|
1355
|
+
}
|
|
1466
1356
|
}
|
|
1467
|
-
this.mapImp.setVisibilityFilter(
|
|
1357
|
+
this.mapImp.setVisibilityFilter(filter)
|
|
1468
1358
|
} else {
|
|
1469
|
-
this.
|
|
1470
|
-
this.alertSelected({
|
|
1471
|
-
value: (payload.checked.length > 0),
|
|
1472
|
-
});
|
|
1359
|
+
this.resetMapFilter()
|
|
1473
1360
|
}
|
|
1474
1361
|
}
|
|
1475
1362
|
},
|
|
@@ -1480,15 +1367,39 @@ export default {
|
|
|
1480
1367
|
* @arg payload
|
|
1481
1368
|
*/
|
|
1482
1369
|
alertSelected: function (payload) {
|
|
1370
|
+
if (this.mapImp) {
|
|
1371
|
+
if (payload.key === "alert") {
|
|
1372
|
+
if (payload.value) {
|
|
1373
|
+
this.mapFilters.alert.with = true
|
|
1374
|
+
} else {
|
|
1375
|
+
this.mapFilters.alert.with = false
|
|
1376
|
+
}
|
|
1377
|
+
} else if (payload.key === "withoutAlert") {
|
|
1378
|
+
if (payload.value) {
|
|
1379
|
+
this.mapFilters.alert.without = true
|
|
1380
|
+
} else {
|
|
1381
|
+
this.mapFilters.alert.without = false
|
|
1382
|
+
}
|
|
1383
|
+
}
|
|
1384
|
+
this.resetMapFilter()
|
|
1385
|
+
}
|
|
1386
|
+
},
|
|
1387
|
+
/**
|
|
1388
|
+
* @vuese
|
|
1389
|
+
* Function to enable/disable (show/hide) all alerts
|
|
1390
|
+
* option by providing ``flag`` (true/false).
|
|
1391
|
+
* @arg flag
|
|
1392
|
+
*/
|
|
1393
|
+
checkAllAlerts: function (payload) {
|
|
1483
1394
|
if (this.mapImp) {
|
|
1484
1395
|
if (payload.value) {
|
|
1485
|
-
this.
|
|
1396
|
+
this.mapFilters.alert.without = true
|
|
1397
|
+
this.mapFilters.alert.with = true
|
|
1486
1398
|
} else {
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
}
|
|
1490
|
-
this.mapImp.setVisibilityFilter(ALERT_FILTER)
|
|
1399
|
+
this.mapFilters.alert.without = false
|
|
1400
|
+
this.mapFilters.alert.with = false
|
|
1491
1401
|
}
|
|
1402
|
+
this.resetMapFilter()
|
|
1492
1403
|
}
|
|
1493
1404
|
},
|
|
1494
1405
|
/**
|
|
@@ -1549,7 +1460,7 @@ export default {
|
|
|
1549
1460
|
},
|
|
1550
1461
|
/**
|
|
1551
1462
|
* @vuese
|
|
1552
|
-
* Function to show or hide connectivity features
|
|
1463
|
+
* Function to show or hide connectivity features studied in particular species
|
|
1553
1464
|
* by providing ``{taxonId, true/false}`` in ``payload.key, payload.value``.
|
|
1554
1465
|
* @arg payload
|
|
1555
1466
|
*/
|
|
@@ -1576,7 +1487,7 @@ export default {
|
|
|
1576
1487
|
},
|
|
1577
1488
|
/**
|
|
1578
1489
|
* @vuese
|
|
1579
|
-
* Function to show or hide connectivity features
|
|
1490
|
+
* Function to show or hide connectivity features studied in particular species
|
|
1580
1491
|
* by providing ``payload`` with ``payload.keys`` array and ``payload.value`` flag.
|
|
1581
1492
|
* @arg payload
|
|
1582
1493
|
*/
|
|
@@ -1627,41 +1538,30 @@ export default {
|
|
|
1627
1538
|
* @arg data
|
|
1628
1539
|
*/
|
|
1629
1540
|
annotationEventCallback: function (payload, data) {
|
|
1630
|
-
// Popup closed will trigger aborted event
|
|
1541
|
+
// Popup closed will trigger aborted event this is used to control the tooltip
|
|
1631
1542
|
if (data.type === 'aborted') {
|
|
1632
1543
|
// Rollback drawing when no new annotation submitted
|
|
1633
|
-
if (!this.
|
|
1634
|
-
else this.
|
|
1544
|
+
if (!this.featureAnnotationSubmitted) this.rollbackAnnotationEvent()
|
|
1545
|
+
else this.featureAnnotationSubmitted = false
|
|
1635
1546
|
} else if (data.type === 'modeChanged') {
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
// Reset data entry for every draw
|
|
1639
|
-
this.initialiseDialog()
|
|
1640
|
-
this.inDrawing = true
|
|
1641
|
-
} else if (data.feature.mode === 'simple_select' && this.inDrawing) {
|
|
1642
|
-
if (this.createdEvent) {
|
|
1643
|
-
this.connectionDisplay = true
|
|
1644
|
-
} else {
|
|
1645
|
-
// Reset if a invalid draw
|
|
1646
|
-
this.initialiseDrawing()
|
|
1647
|
-
}
|
|
1547
|
+
if (data.feature.mode === 'simple_select' && this.activeDrawTool) {
|
|
1548
|
+
if (!this.drawnCreatedEvent) this.initialiseDrawing() // Reset if invalid linestring or polygon
|
|
1648
1549
|
} else if (data.feature.mode === 'direct_select') {
|
|
1649
1550
|
this.doubleClickedFeature = true
|
|
1650
1551
|
}
|
|
1651
1552
|
} else if (data.type === 'selectionChanged') {
|
|
1652
|
-
this.
|
|
1653
|
-
data.feature.features
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
if (!this.inDrawing) {
|
|
1658
|
-
this.initialiseDialog()
|
|
1553
|
+
this.selectedDrawnFeature = data.feature.features.length === 0 ?
|
|
1554
|
+
undefined : data.feature.features[0]
|
|
1555
|
+
payload.feature.feature = this.selectedDrawnFeature
|
|
1556
|
+
if (!this.activeDrawTool) { // Make sure dialog content doesn't change
|
|
1557
|
+
this.connectionEntry = {}
|
|
1659
1558
|
// For exist drawn annotation features
|
|
1660
|
-
if (this.
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1559
|
+
if (this.selectedDrawnFeature) {
|
|
1560
|
+
const drawnFeature = this.existDrawnFeatures.find(
|
|
1561
|
+
(feature) => feature.id === this.selectedDrawnFeature.id
|
|
1562
|
+
)
|
|
1563
|
+
if (drawnFeature && drawnFeature.connection) {
|
|
1564
|
+
this.connectionEntry = drawnFeature.connection
|
|
1665
1565
|
}
|
|
1666
1566
|
this.drawModeEvent(payload)
|
|
1667
1567
|
}
|
|
@@ -1678,11 +1578,8 @@ export default {
|
|
|
1678
1578
|
}
|
|
1679
1579
|
// Once double click mouse to confirm drawing, 'aborted' event will be triggered.
|
|
1680
1580
|
// Hence disable direct popup when 'created' event, dialog will be used instead.
|
|
1681
|
-
if (data.type === 'created')
|
|
1682
|
-
|
|
1683
|
-
} else {
|
|
1684
|
-
this.checkAndCreatePopups(payload)
|
|
1685
|
-
}
|
|
1581
|
+
if (data.type === 'created') this.drawnCreatedEvent = payload
|
|
1582
|
+
else this.checkAndCreatePopups(payload)
|
|
1686
1583
|
}
|
|
1687
1584
|
},
|
|
1688
1585
|
/**
|
|
@@ -1702,7 +1599,6 @@ export default {
|
|
|
1702
1599
|
this.annotationEventCallback(payload, data)
|
|
1703
1600
|
} else {
|
|
1704
1601
|
if (eventType !== 'pan-zoom') {
|
|
1705
|
-
this.featuresAlert = data.alert
|
|
1706
1602
|
const label = data.label
|
|
1707
1603
|
const resource = [data.models]
|
|
1708
1604
|
const taxonomy = this.entry
|
|
@@ -1728,21 +1624,27 @@ export default {
|
|
|
1728
1624
|
provenanceTaxonomy: taxons,
|
|
1729
1625
|
}
|
|
1730
1626
|
if (eventType === 'click') {
|
|
1627
|
+
this.featuresAlert = data.alert
|
|
1731
1628
|
if (this.viewingMode === 'Network Discovery') {
|
|
1732
1629
|
this.highlightConnectedPaths([data.models])
|
|
1733
1630
|
} else {
|
|
1734
1631
|
this.currentActive = data.models ? data.models : ''
|
|
1735
|
-
//
|
|
1736
|
-
if (this.
|
|
1737
|
-
//
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1632
|
+
// Drawing connectivity between features
|
|
1633
|
+
if (this.activeDrawTool && !this.drawnCreatedEvent) {
|
|
1634
|
+
// Check if flatmap features or existing drawn features
|
|
1635
|
+
const validDrawnFeature = data.featureId || this.existDrawnFeatures.find(
|
|
1636
|
+
(feature) => feature.id === data.id
|
|
1637
|
+
)
|
|
1638
|
+
// Only the linestring will have connection
|
|
1639
|
+
if (this.activeDrawTool === 'LineString' && validDrawnFeature) {
|
|
1640
|
+
const key = data.featureId ? data.featureId : data.id
|
|
1641
|
+
const nodeLabel = data.label ? data.label : `Feature ${data.id}`
|
|
1642
|
+
// Add space before key to make sure properties follows adding order
|
|
1643
|
+
this.connectionEntry[` ${key}`] = Object.assign({ label: nodeLabel },
|
|
1742
1644
|
Object.fromEntries(
|
|
1743
1645
|
Object.entries(data)
|
|
1744
|
-
|
|
1745
|
-
|
|
1646
|
+
.filter(([key]) => ['featureId', 'models'].includes(key))
|
|
1647
|
+
.map(([key, value]) => [(key === 'featureId') ? 'id' : key, value])))
|
|
1746
1648
|
}
|
|
1747
1649
|
}
|
|
1748
1650
|
}
|
|
@@ -1758,7 +1660,7 @@ export default {
|
|
|
1758
1660
|
eventType === 'click' &&
|
|
1759
1661
|
!(this.viewingMode === 'Network Discovery') &&
|
|
1760
1662
|
// Disable popup when drawing
|
|
1761
|
-
!this.
|
|
1663
|
+
!this.activeDrawTool
|
|
1762
1664
|
) {
|
|
1763
1665
|
this.checkAndCreatePopups(payload)
|
|
1764
1666
|
}
|
|
@@ -1769,111 +1671,6 @@ export default {
|
|
|
1769
1671
|
}
|
|
1770
1672
|
}
|
|
1771
1673
|
},
|
|
1772
|
-
/**
|
|
1773
|
-
* A hack to implement connection dialog drag action and scope.
|
|
1774
|
-
*/
|
|
1775
|
-
dialogCssHacks: function () {
|
|
1776
|
-
this.$nextTick(() => {
|
|
1777
|
-
const dialog = this.$el.querySelector('.connection-dialog')
|
|
1778
|
-
draggable(this.$el, dialog)
|
|
1779
|
-
// dialog popup at the click position
|
|
1780
|
-
// slightly change x or y if close to boundary
|
|
1781
|
-
let posX, posY
|
|
1782
|
-
const containerRect = this.$el.getBoundingClientRect()
|
|
1783
|
-
const dialogRect = dialog.getBoundingClientRect()
|
|
1784
|
-
if (this.dialogPosition.x > containerRect.width / 2) {
|
|
1785
|
-
posX = this.dialogPosition.x - dialogRect.width
|
|
1786
|
-
} else {
|
|
1787
|
-
posX = this.dialogPosition.x
|
|
1788
|
-
}
|
|
1789
|
-
if (this.dialogPosition.y > containerRect.height / 2) {
|
|
1790
|
-
posY = this.dialogPosition.y - dialogRect.height
|
|
1791
|
-
} else {
|
|
1792
|
-
posY = this.dialogPosition.y
|
|
1793
|
-
}
|
|
1794
|
-
dialog.style.transform =
|
|
1795
|
-
`translate(${posX - this.dialogPosition.offsetX}px, ${posY - this.dialogPosition.offsetY}px)`
|
|
1796
|
-
})
|
|
1797
|
-
},
|
|
1798
|
-
/**
|
|
1799
|
-
* A hack to handle the status of annotation tools.
|
|
1800
|
-
*/
|
|
1801
|
-
drawIconCssHacks: function () {
|
|
1802
|
-
// set tool/mode icon status
|
|
1803
|
-
if (this.$el.querySelector('.iconSelected') || !this.connectionDisplay) {
|
|
1804
|
-
this.drawnTypes.map((t) => {
|
|
1805
|
-
const dtype = this.$el.querySelector(`.draw${t}`)
|
|
1806
|
-
if (dtype) {
|
|
1807
|
-
dtype.classList.remove('iconSelected');
|
|
1808
|
-
dtype.classList.remove('inactive');
|
|
1809
|
-
}
|
|
1810
|
-
})
|
|
1811
|
-
this.drawModes.map((m) => {
|
|
1812
|
-
this.$el.querySelector(`.draw${m}`).classList.remove('iconSelected');
|
|
1813
|
-
this.$el.querySelector(`.draw${m}`).classList.remove('inactive');
|
|
1814
|
-
})
|
|
1815
|
-
}
|
|
1816
|
-
if (this.activeDrawTool) {
|
|
1817
|
-
this.$el.querySelector(`.draw${this.activeDrawTool}`).classList.add('iconSelected');
|
|
1818
|
-
this.drawModes.map((m) => {
|
|
1819
|
-
this.$el.querySelector(`.draw${m}`).classList.add('inactive');
|
|
1820
|
-
})
|
|
1821
|
-
} else if (this.activeDrawMode || this.connectionDisplay) {
|
|
1822
|
-
if (this.activeDrawMode) {
|
|
1823
|
-
this.$el.querySelector(`.draw${this.activeDrawMode}`).classList.add('iconSelected');
|
|
1824
|
-
}
|
|
1825
|
-
this.drawnTypes.map((t) => {
|
|
1826
|
-
const dtype = this.$el.querySelector(`.draw${t}`)
|
|
1827
|
-
if (dtype) dtype.classList.add('inactive');
|
|
1828
|
-
})
|
|
1829
|
-
}
|
|
1830
|
-
},
|
|
1831
|
-
/**
|
|
1832
|
-
* @vuese
|
|
1833
|
-
* Function to fire annotation event based on the provided ``data``.
|
|
1834
|
-
* Either edit or delete event.
|
|
1835
|
-
* @arg data
|
|
1836
|
-
*/
|
|
1837
|
-
drawModeEvent: function (data) {
|
|
1838
|
-
if (this.activeDrawMode) {
|
|
1839
|
-
// double click fires 'updated' callback
|
|
1840
|
-
if (this.doubleClickedFeature) {
|
|
1841
|
-
if (data.feature.feature.geometry.type !== 'Point') {
|
|
1842
|
-
// show tooltip and enter edit mode
|
|
1843
|
-
this.changeAnnotationDrawMode({
|
|
1844
|
-
mode: 'direct_select',
|
|
1845
|
-
options: { featureId: data.feature.feature.id }
|
|
1846
|
-
})
|
|
1847
|
-
this.deleteOrEditAnnotationFeature()
|
|
1848
|
-
}
|
|
1849
|
-
this.doubleClickedFeature = false
|
|
1850
|
-
} else {
|
|
1851
|
-
// single click fires delete
|
|
1852
|
-
if (this.activeDrawMode === 'Delete') {
|
|
1853
|
-
this.changeAnnotationDrawMode({
|
|
1854
|
-
mode: 'simple_select',
|
|
1855
|
-
options: { featureIds: [data.feature.feature.id] }
|
|
1856
|
-
})
|
|
1857
|
-
this.deleteOrEditAnnotationFeature()
|
|
1858
|
-
}
|
|
1859
|
-
}
|
|
1860
|
-
}
|
|
1861
|
-
},
|
|
1862
|
-
/**
|
|
1863
|
-
* Function to create connectivity body from existing entries.
|
|
1864
|
-
*/
|
|
1865
|
-
createConnectivityBody: function () {
|
|
1866
|
-
if (Object.keys(this.connectionEntry).length > 0) {
|
|
1867
|
-
const features = Object.values(this.connectionEntry)
|
|
1868
|
-
const body = {
|
|
1869
|
-
type: 'connectivity',
|
|
1870
|
-
source: features[0],
|
|
1871
|
-
target: features[features.length - 1],
|
|
1872
|
-
intermediates: features.slice(1, -1),
|
|
1873
|
-
}
|
|
1874
|
-
this.annotationEntry.body = body
|
|
1875
|
-
}
|
|
1876
|
-
},
|
|
1877
1674
|
/**
|
|
1878
1675
|
* @vuese
|
|
1879
1676
|
* Function triggered by viewing mode change.
|
|
@@ -1901,23 +1698,21 @@ export default {
|
|
|
1901
1698
|
if (data.feature.featureId && data.feature.models) {
|
|
1902
1699
|
this.displayTooltip(data.feature.models)
|
|
1903
1700
|
} else if (data.feature.feature) {
|
|
1904
|
-
|
|
1905
|
-
|
|
1701
|
+
// in drawing or edit/delete mode is on or has connectivity
|
|
1702
|
+
if (
|
|
1703
|
+
this.activeDrawTool ||
|
|
1704
|
+
this.activeDrawMode ||
|
|
1705
|
+
Object.keys(this.connectionEntry).length > 0
|
|
1706
|
+
) {
|
|
1707
|
+
this.featureAnnotationSubmitted = false
|
|
1906
1708
|
this.annotationEntry.featureId = data.feature.feature.id
|
|
1907
|
-
this.createConnectivityBody()
|
|
1709
|
+
if (this.activeDrawTool) this.createConnectivityBody()
|
|
1908
1710
|
this.displayTooltip(
|
|
1909
1711
|
data.feature.feature.id,
|
|
1910
1712
|
centroid(data.feature.feature.geometry)
|
|
1911
1713
|
)
|
|
1912
1714
|
} else {
|
|
1913
|
-
|
|
1914
|
-
if (data.feature.type === 'updated') {
|
|
1915
|
-
this.rollbackAnnotationEvent()
|
|
1916
|
-
}
|
|
1917
|
-
}
|
|
1918
|
-
// Hide dialog when updated or deleted event is fired and tooltip is displayed
|
|
1919
|
-
if (data.feature.type === 'updated' || data.feature.type === 'deleted') {
|
|
1920
|
-
this.initialiseDialog()
|
|
1715
|
+
this.rollbackAnnotationEvent()
|
|
1921
1716
|
}
|
|
1922
1717
|
}
|
|
1923
1718
|
} else {
|
|
@@ -1953,14 +1748,6 @@ export default {
|
|
|
1953
1748
|
if (ftooltip) ftooltip.style.display = 'block'
|
|
1954
1749
|
}
|
|
1955
1750
|
},
|
|
1956
|
-
/**
|
|
1957
|
-
* @vuese
|
|
1958
|
-
* Function to close popup.
|
|
1959
|
-
*/
|
|
1960
|
-
closePopup: function () {
|
|
1961
|
-
let cbutton = document.querySelector('.maplibregl-popup-close-button')
|
|
1962
|
-
if (cbutton) cbutton.click()
|
|
1963
|
-
},
|
|
1964
1751
|
/**
|
|
1965
1752
|
* @vuese
|
|
1966
1753
|
* Function to close tooltip.
|
|
@@ -2053,12 +1840,76 @@ export default {
|
|
|
2053
1840
|
* @arg helpMode
|
|
2054
1841
|
*/
|
|
2055
1842
|
setHelpMode: function (helpMode) {
|
|
2056
|
-
|
|
2057
|
-
|
|
1843
|
+
const toolTipsLength = this.hoverVisibilities.length;
|
|
1844
|
+
const lastIndex = toolTipsLength - 1;
|
|
1845
|
+
const activePopoverObj = this.hoverVisibilities[this.helpModeActiveIndex];
|
|
1846
|
+
|
|
1847
|
+
if (activePopoverObj) {
|
|
1848
|
+
const popoverRefsId = activePopoverObj?.refs;
|
|
1849
|
+
const popoverRefId = activePopoverObj?.ref;
|
|
1850
|
+
const popoverRef = this.$refs[popoverRefsId ? popoverRefsId : popoverRefId];
|
|
1851
|
+
|
|
1852
|
+
if (popoverRef) {
|
|
1853
|
+
// Open pathway drawer if the tooltip is inside or beside
|
|
1854
|
+
const { parentElement, nextElementSibling } = popoverRef.$el;
|
|
1855
|
+
const isPathwayContainer = (element) => {
|
|
1856
|
+
return element && (
|
|
1857
|
+
element.classList.contains('pathway-container') ||
|
|
1858
|
+
element.classList.contains('pathway-location')
|
|
1859
|
+
);
|
|
1860
|
+
};
|
|
1861
|
+
|
|
1862
|
+
if (
|
|
1863
|
+
isPathwayContainer(parentElement) ||
|
|
1864
|
+
isPathwayContainer(nextElementSibling)
|
|
1865
|
+
) {
|
|
1866
|
+
this.drawerOpen = true;
|
|
1867
|
+
}
|
|
1868
|
+
} else {
|
|
1869
|
+
// skip the unavailable tooltips
|
|
1870
|
+
this.helpModeActiveIndex += 1;
|
|
1871
|
+
}
|
|
1872
|
+
}
|
|
1873
|
+
|
|
1874
|
+
if (!helpMode) {
|
|
1875
|
+
// reset to iniital state
|
|
1876
|
+
this.helpModeActiveIndex = this.helpModeInitialIndex;
|
|
1877
|
+
}
|
|
1878
|
+
|
|
1879
|
+
if (this.viewingMode !== 'Annotation' && this.helpModeActiveIndex > 9) {
|
|
1880
|
+
this.helpModeActiveIndex = lastIndex
|
|
1881
|
+
}
|
|
1882
|
+
|
|
1883
|
+
if (helpMode && this.helpModeActiveIndex >= lastIndex) {
|
|
1884
|
+
/**
|
|
1885
|
+
* This event is emitted when the tooltips in help mode reach the last item.
|
|
1886
|
+
*/
|
|
1887
|
+
this.$emit('help-mode-last-item', true);
|
|
1888
|
+
}
|
|
1889
|
+
|
|
1890
|
+
if (helpMode && !this.helpModeDialog) {
|
|
1891
|
+
this.inHelp = true;
|
|
2058
1892
|
this.hoverVisibilities.forEach((item) => {
|
|
2059
|
-
item.value = true
|
|
2060
|
-
})
|
|
2061
|
-
|
|
1893
|
+
item.value = true;
|
|
1894
|
+
});
|
|
1895
|
+
} else if (helpMode && this.helpModeDialog && toolTipsLength > this.helpModeActiveIndex) {
|
|
1896
|
+
|
|
1897
|
+
// Show the map tooltip as first item
|
|
1898
|
+
if (this.helpModeActiveIndex > -1) {
|
|
1899
|
+
this.closeFlatmapHelpPopup();
|
|
1900
|
+
|
|
1901
|
+
// wait for CSS transition
|
|
1902
|
+
setTimeout(() => {
|
|
1903
|
+
this.inHelp = false;
|
|
1904
|
+
this.hoverVisibilities.forEach((item) => {
|
|
1905
|
+
item.value = false;
|
|
1906
|
+
});
|
|
1907
|
+
|
|
1908
|
+
this.showTooltip(this.helpModeActiveIndex, 200);
|
|
1909
|
+
}, 300);
|
|
1910
|
+
} else if (this.helpModeActiveIndex === -1) {
|
|
1911
|
+
this.openFlatmapHelpPopup();
|
|
1912
|
+
}
|
|
2062
1913
|
} else {
|
|
2063
1914
|
this.inHelp = false
|
|
2064
1915
|
this.hoverVisibilities.forEach((item) => {
|
|
@@ -2073,12 +1924,16 @@ export default {
|
|
|
2073
1924
|
* by providing ``tooltipNumber``.
|
|
2074
1925
|
* @arg tooltipNumber
|
|
2075
1926
|
*/
|
|
2076
|
-
|
|
1927
|
+
showTooltip: function (tooltipNumber, timeout = 500) {
|
|
2077
1928
|
if (!this.inHelp) {
|
|
2078
1929
|
clearTimeout(this.tooltipWait[tooltipNumber])
|
|
2079
1930
|
this.tooltipWait[tooltipNumber] = setTimeout(() => {
|
|
2080
1931
|
this.hoverVisibilities[tooltipNumber].value = true
|
|
2081
|
-
|
|
1932
|
+
/**
|
|
1933
|
+
* This event is emitted after a tooltip in Flatmap is shown.
|
|
1934
|
+
*/
|
|
1935
|
+
this.$emit('shown-tooltip');
|
|
1936
|
+
}, timeout)
|
|
2082
1937
|
}
|
|
2083
1938
|
},
|
|
2084
1939
|
/**
|
|
@@ -2087,12 +1942,12 @@ export default {
|
|
|
2087
1942
|
* by providing ``tooltipNumber``.
|
|
2088
1943
|
* @arg tooltipNumber
|
|
2089
1944
|
*/
|
|
2090
|
-
|
|
1945
|
+
hideTooltip: function (tooltipNumber, timeout = 500) {
|
|
2091
1946
|
if (!this.inHelp) {
|
|
2092
1947
|
clearTimeout(this.tooltipWait[tooltipNumber])
|
|
2093
1948
|
this.tooltipWait[tooltipNumber] = setTimeout(() => {
|
|
2094
1949
|
this.hoverVisibilities[tooltipNumber].value = false
|
|
2095
|
-
},
|
|
1950
|
+
}, timeout)
|
|
2096
1951
|
}
|
|
2097
1952
|
},
|
|
2098
1953
|
/**
|
|
@@ -2110,7 +1965,7 @@ export default {
|
|
|
2110
1965
|
options.annotationFeatureGeometry = geometry
|
|
2111
1966
|
} else {
|
|
2112
1967
|
featureId = this.mapImp.modelFeatureIds(feature)[0]
|
|
2113
|
-
if (!this.
|
|
1968
|
+
if (!this.activeDrawTool) {
|
|
2114
1969
|
options.positionAtLastClick = true
|
|
2115
1970
|
}
|
|
2116
1971
|
}
|
|
@@ -2134,6 +1989,10 @@ export default {
|
|
|
2134
1989
|
anchor: 'top',
|
|
2135
1990
|
className: 'flatmap-popup-popper',
|
|
2136
1991
|
})
|
|
1992
|
+
/**
|
|
1993
|
+
* This event is emitted after a tooltip on Flatmap's map is shown.
|
|
1994
|
+
*/
|
|
1995
|
+
this.$emit('shown-map-tooltip');
|
|
2137
1996
|
}
|
|
2138
1997
|
}
|
|
2139
1998
|
},
|
|
@@ -2498,6 +2357,37 @@ export default {
|
|
|
2498
2357
|
type: Boolean,
|
|
2499
2358
|
default: false,
|
|
2500
2359
|
},
|
|
2360
|
+
/**
|
|
2361
|
+
* The active item index of help mode.
|
|
2362
|
+
*/
|
|
2363
|
+
helpModeActiveItem: {
|
|
2364
|
+
type: Number,
|
|
2365
|
+
default: 0,
|
|
2366
|
+
},
|
|
2367
|
+
/**
|
|
2368
|
+
* The option to use helpModeDialog.
|
|
2369
|
+
* On default, `false`, clicking help will show all tooltips.
|
|
2370
|
+
* If `true`, clicking help will show the help-mode-dialog.
|
|
2371
|
+
*/
|
|
2372
|
+
helpModeDialog: {
|
|
2373
|
+
type: Boolean,
|
|
2374
|
+
default: false,
|
|
2375
|
+
},
|
|
2376
|
+
/**
|
|
2377
|
+
* The last item of help mode.
|
|
2378
|
+
*/
|
|
2379
|
+
helpModeLastItem: {
|
|
2380
|
+
type: Boolean,
|
|
2381
|
+
default: false,
|
|
2382
|
+
},
|
|
2383
|
+
/**
|
|
2384
|
+
* The initial index number for help mode tooltips.
|
|
2385
|
+
* Set negative (e.g. -2) if there are other tooltips outside of `hoverVisibilities`.
|
|
2386
|
+
*/
|
|
2387
|
+
helpModeInitialIndex: {
|
|
2388
|
+
type: Number,
|
|
2389
|
+
default: 0,
|
|
2390
|
+
},
|
|
2501
2391
|
/**
|
|
2502
2392
|
* The option to create map on component mounted.
|
|
2503
2393
|
*/
|
|
@@ -2533,22 +2423,6 @@ export default {
|
|
|
2533
2423
|
*/
|
|
2534
2424
|
openMapOptions: {
|
|
2535
2425
|
type: Array,
|
|
2536
|
-
/**
|
|
2537
|
-
* ```[
|
|
2538
|
-
{
|
|
2539
|
-
display: 'Open AC Map',
|
|
2540
|
-
key: 'AC',
|
|
2541
|
-
},
|
|
2542
|
-
{
|
|
2543
|
-
display: 'Open FC Map',
|
|
2544
|
-
key: 'FC',
|
|
2545
|
-
},
|
|
2546
|
-
{
|
|
2547
|
-
display: 'Open 3D Human Map',
|
|
2548
|
-
key: '3D',
|
|
2549
|
-
},
|
|
2550
|
-
]```
|
|
2551
|
-
*/
|
|
2552
2426
|
default: function () {
|
|
2553
2427
|
return [
|
|
2554
2428
|
{
|
|
@@ -2622,8 +2496,8 @@ export default {
|
|
|
2622
2496
|
flatmapAPI: this.flatmapAPI,
|
|
2623
2497
|
sparcAPI: this.sparcAPI,
|
|
2624
2498
|
$annotator: this.annotator,
|
|
2625
|
-
userApiKey: this.userToken,
|
|
2626
2499
|
getFeaturesAlert: () => this.featuresAlert,
|
|
2500
|
+
userApiKey: this.userToken,
|
|
2627
2501
|
}
|
|
2628
2502
|
},
|
|
2629
2503
|
data: function () {
|
|
@@ -2653,23 +2527,24 @@ export default {
|
|
|
2653
2527
|
taxonConnectivity: [],
|
|
2654
2528
|
pathwaysMaxHeight: 1000,
|
|
2655
2529
|
hoverVisibilities: [
|
|
2656
|
-
{ value: false },
|
|
2657
|
-
{ value: false },
|
|
2658
|
-
{ value: false },
|
|
2659
|
-
{ value: false },
|
|
2660
|
-
{ value: false },
|
|
2661
|
-
{ value: false },
|
|
2662
|
-
{ value: false },
|
|
2663
|
-
{ value: false },
|
|
2664
|
-
{ value: false },
|
|
2665
|
-
{ value: false },
|
|
2666
|
-
{ value: false },
|
|
2667
|
-
{ value: false },
|
|
2668
|
-
{ value: false },
|
|
2669
|
-
{ value: false },
|
|
2670
|
-
{ value: false },
|
|
2671
|
-
{ value: false },
|
|
2530
|
+
{ value: false, ref: 'zoomInPopover' }, // 0
|
|
2531
|
+
{ value: false, ref: 'zoomOutPopover' }, // 1
|
|
2532
|
+
{ value: false, ref: 'zoomFitPopover' }, // 2
|
|
2533
|
+
{ value: false, ref: 'settingsPopover' }, // 3
|
|
2534
|
+
{ value: false, ref: 'checkBoxPopover' }, // 4
|
|
2535
|
+
{ value: false, ref: 'markerPopover' }, // 5
|
|
2536
|
+
{ value: false, ref: 'warningPopover' }, // 6
|
|
2537
|
+
{ value: false, ref: 'whatsNewPopover' }, // 7
|
|
2538
|
+
{ value: false, ref: 'openMapPopover' }, // 8
|
|
2539
|
+
{ value: false, ref: 'featuredMarkerPopover' }, // 9
|
|
2540
|
+
{ value: false, refs: 'drawToolPopover', ref: 'connectionPopover' }, // 10
|
|
2541
|
+
{ value: false, refs: 'drawToolPopover', ref: 'drawPointPopover' }, // 11
|
|
2542
|
+
{ value: false, refs: 'drawToolPopover', ref: 'drawLinePopover' }, // 12
|
|
2543
|
+
{ value: false, refs: 'drawToolPopover', ref: 'drawPolygonPopover' }, // 13
|
|
2544
|
+
{ value: false, refs: 'drawToolPopover', ref: 'deletePopover' }, // 14
|
|
2545
|
+
{ value: false, refs: 'drawToolPopover', ref: 'editPopover' }, // 15
|
|
2672
2546
|
],
|
|
2547
|
+
helpModeActiveIndex: this.helpModeInitialIndex,
|
|
2673
2548
|
yellowstar: yellowstar,
|
|
2674
2549
|
isFC: false,
|
|
2675
2550
|
inHelp: false,
|
|
@@ -2688,7 +2563,7 @@ export default {
|
|
|
2688
2563
|
minimapResizeShow: false,
|
|
2689
2564
|
minimapSmall: false,
|
|
2690
2565
|
currentActive: '',
|
|
2691
|
-
|
|
2566
|
+
selectedDrawnFeature: undefined, // Clicked drawn annotation
|
|
2692
2567
|
currentHover: '',
|
|
2693
2568
|
viewingMode: 'Exploration',
|
|
2694
2569
|
viewingModes: ['Annotation', 'Exploration', 'Network Discovery'],
|
|
@@ -2701,22 +2576,13 @@ export default {
|
|
|
2701
2576
|
annotator: undefined,
|
|
2702
2577
|
userInformation: undefined,
|
|
2703
2578
|
activeDrawTool: undefined,
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
annotationSubmitted: false,
|
|
2707
|
-
inDrawing: false,
|
|
2708
|
-
connectionDisplay: false,
|
|
2579
|
+
drawnCreatedEvent: undefined,
|
|
2580
|
+
featureAnnotationSubmitted: false,
|
|
2709
2581
|
connectionEntry: {},
|
|
2710
|
-
|
|
2582
|
+
existDrawnFeatures: [], // Store all exist drawn features
|
|
2711
2583
|
doubleClickedFeature: false,
|
|
2712
2584
|
activeDrawMode: undefined,
|
|
2713
2585
|
drawModes: ['Delete', 'Edit'],
|
|
2714
|
-
dialogPosition: {
|
|
2715
|
-
offsetX: 0,
|
|
2716
|
-
offsetY: 0,
|
|
2717
|
-
x: undefined,
|
|
2718
|
-
y: undefined
|
|
2719
|
-
},
|
|
2720
2586
|
containsAlert: false,
|
|
2721
2587
|
alertOptions: [
|
|
2722
2588
|
{
|
|
@@ -2724,14 +2590,22 @@ export default {
|
|
|
2724
2590
|
key: 'alert',
|
|
2725
2591
|
enabled: true,
|
|
2726
2592
|
},
|
|
2593
|
+
{
|
|
2594
|
+
label: 'Display Path Without Alerts',
|
|
2595
|
+
key: 'withoutAlert',
|
|
2596
|
+
enabled: true,
|
|
2597
|
+
},
|
|
2727
2598
|
],
|
|
2599
|
+
mapFilters: markRaw({
|
|
2600
|
+
alert: {
|
|
2601
|
+
with: true,
|
|
2602
|
+
without: true,
|
|
2603
|
+
}
|
|
2604
|
+
})
|
|
2728
2605
|
}
|
|
2729
2606
|
},
|
|
2730
2607
|
computed: {
|
|
2731
|
-
...mapState(useMainStore, ['userToken'])
|
|
2732
|
-
connection: function () {
|
|
2733
|
-
return Object.keys(this.connectionEntry).length > 0
|
|
2734
|
-
}
|
|
2608
|
+
...mapState(useMainStore, ['userToken'])
|
|
2735
2609
|
},
|
|
2736
2610
|
watch: {
|
|
2737
2611
|
entry: function () {
|
|
@@ -2739,7 +2613,15 @@ export default {
|
|
|
2739
2613
|
},
|
|
2740
2614
|
helpMode: function (newVal, oldVal) {
|
|
2741
2615
|
if (newVal !== oldVal) {
|
|
2742
|
-
this.setHelpMode(
|
|
2616
|
+
this.setHelpMode(newVal)
|
|
2617
|
+
}
|
|
2618
|
+
},
|
|
2619
|
+
helpModeActiveItem: function () {
|
|
2620
|
+
// just take the action from helpModeActiveItem
|
|
2621
|
+
// work with local value since the indexing is different
|
|
2622
|
+
if (this.helpMode) {
|
|
2623
|
+
this.helpModeActiveIndex += 1;
|
|
2624
|
+
this.setHelpMode(this.helpMode);
|
|
2743
2625
|
}
|
|
2744
2626
|
},
|
|
2745
2627
|
state: {
|
|
@@ -2756,67 +2638,15 @@ export default {
|
|
|
2756
2638
|
immediate: true,
|
|
2757
2639
|
deep: true,
|
|
2758
2640
|
},
|
|
2759
|
-
activeDrawTool: function () {
|
|
2760
|
-
this.drawIconCssHacks()
|
|
2761
|
-
},
|
|
2762
|
-
activeDrawMode: function () {
|
|
2763
|
-
this.drawIconCssHacks()
|
|
2764
|
-
},
|
|
2765
|
-
/**
|
|
2766
|
-
* hide dialog when connectionEntry is empty
|
|
2767
|
-
*/
|
|
2768
|
-
connection: function (value) {
|
|
2769
|
-
const connectionIcon = this.$el.querySelector('.drawConnection')
|
|
2770
|
-
if (!value) {
|
|
2771
|
-
this.connectionDisplay = false
|
|
2772
|
-
connectionIcon.classList.add('inactive')
|
|
2773
|
-
} else {
|
|
2774
|
-
connectionIcon.classList.remove('inactive')
|
|
2775
|
-
}
|
|
2776
|
-
},
|
|
2777
|
-
/**
|
|
2778
|
-
* popup dialog via click icon
|
|
2779
|
-
*/
|
|
2780
|
-
connectionDisplay: function (display) {
|
|
2781
|
-
const connectionIcon = this.$el.querySelector('.drawConnection')
|
|
2782
|
-
if (display) {
|
|
2783
|
-
connectionIcon.classList.add('iconSelected')
|
|
2784
|
-
this.dialogCssHacks()
|
|
2785
|
-
} else {
|
|
2786
|
-
connectionIcon.classList.remove('iconSelected')
|
|
2787
|
-
}
|
|
2788
|
-
this.drawIconCssHacks()
|
|
2789
|
-
},
|
|
2790
|
-
/**
|
|
2791
|
-
* Set dialog offset when flatmap annotator used
|
|
2792
|
-
*/
|
|
2793
|
-
dialogPosition: {
|
|
2794
|
-
handler: function () {
|
|
2795
|
-
const containerRect = this.$el.getBoundingClientRect()
|
|
2796
|
-
this.dialogPosition.offsetX = containerRect.x
|
|
2797
|
-
this.dialogPosition.offsetY = containerRect.y
|
|
2798
|
-
},
|
|
2799
|
-
deep: true,
|
|
2800
|
-
once: true,
|
|
2801
|
-
},
|
|
2802
2641
|
viewingMode: function (mode) {
|
|
2803
2642
|
if (mode === 'Annotation') {
|
|
2804
|
-
this.$el.querySelector('.maplibregl-canvas').addEventListener('click', (e) => {
|
|
2805
|
-
e.preventDefault();
|
|
2806
|
-
this.dialogPosition.x = e.clientX
|
|
2807
|
-
this.dialogPosition.y = e.clientY
|
|
2808
|
-
// use to fix the draw point pop up position issue
|
|
2809
|
-
if (this.activeDrawTool === 'Point') {
|
|
2810
|
-
this.dialogCssHacks()
|
|
2811
|
-
}
|
|
2812
|
-
}, false)
|
|
2813
2643
|
this.loading = true
|
|
2814
2644
|
this.annotator.authenticate(this.userToken).then((userData) => {
|
|
2815
2645
|
if (userData.name && userData.email) {
|
|
2816
2646
|
this.showAnnotator(true)
|
|
2817
2647
|
this.userInformation = userData
|
|
2818
2648
|
this.setFeatureAnnotated()
|
|
2819
|
-
if (
|
|
2649
|
+
if (this.existDrawnFeatures.length === 0) {
|
|
2820
2650
|
this.addAnnotationFeature()
|
|
2821
2651
|
}
|
|
2822
2652
|
}
|
|
@@ -2824,6 +2654,11 @@ export default {
|
|
|
2824
2654
|
})
|
|
2825
2655
|
} else this.showAnnotator(false)
|
|
2826
2656
|
},
|
|
2657
|
+
activeDrawMode: function () {
|
|
2658
|
+
// Deselect any feature when draw mode is changed
|
|
2659
|
+
this.changeAnnotationDrawMode({ mode: 'simple_select' })
|
|
2660
|
+
this.connectionEntry = {}
|
|
2661
|
+
},
|
|
2827
2662
|
disableUI: function (isUIDisabled) {
|
|
2828
2663
|
if (isUIDisabled) {
|
|
2829
2664
|
this.closeTooltip()
|
|
@@ -2860,6 +2695,14 @@ export default {
|
|
|
2860
2695
|
font-size: 25px;
|
|
2861
2696
|
}
|
|
2862
2697
|
|
|
2698
|
+
.warning-icon,
|
|
2699
|
+
.latest-changesicon {
|
|
2700
|
+
display: flex;
|
|
2701
|
+
width: max-content;
|
|
2702
|
+
align-items: center;
|
|
2703
|
+
gap: 5px;
|
|
2704
|
+
}
|
|
2705
|
+
|
|
2863
2706
|
.warning-icon {
|
|
2864
2707
|
color: $warning;
|
|
2865
2708
|
|
|
@@ -2884,6 +2727,7 @@ export default {
|
|
|
2884
2727
|
}
|
|
2885
2728
|
|
|
2886
2729
|
.latest-changesicon {
|
|
2730
|
+
margin-top: 5px;
|
|
2887
2731
|
color: $success;
|
|
2888
2732
|
|
|
2889
2733
|
&:hover {
|
|
@@ -2905,8 +2749,7 @@ export default {
|
|
|
2905
2749
|
.pathway-location {
|
|
2906
2750
|
position: absolute;
|
|
2907
2751
|
bottom: 0px;
|
|
2908
|
-
transition: all
|
|
2909
|
-
z-index: 8;
|
|
2752
|
+
transition: all var(--el-transition-duration);
|
|
2910
2753
|
&.open {
|
|
2911
2754
|
left: 0px;
|
|
2912
2755
|
}
|
|
@@ -2933,8 +2776,7 @@ export default {
|
|
|
2933
2776
|
background: #ffffff;
|
|
2934
2777
|
overflow-x: hidden;
|
|
2935
2778
|
scrollbar-width: thin;
|
|
2936
|
-
|
|
2937
|
-
transition: all 1s ease;
|
|
2779
|
+
transition: all var(--el-transition-duration);
|
|
2938
2780
|
&.open {
|
|
2939
2781
|
opacity: 1;
|
|
2940
2782
|
position: relative;
|
|
@@ -2955,11 +2797,15 @@ export default {
|
|
|
2955
2797
|
}
|
|
2956
2798
|
|
|
2957
2799
|
.flatmap-marker-help {
|
|
2958
|
-
display:
|
|
2959
|
-
|
|
2800
|
+
display: block;
|
|
2801
|
+
width: max-content;
|
|
2802
|
+
margin: 0.5rem;
|
|
2960
2803
|
|
|
2961
|
-
:deep(.
|
|
2962
|
-
|
|
2804
|
+
:deep(.flatmap-marker svg) {
|
|
2805
|
+
display: block;
|
|
2806
|
+
width: 28px;
|
|
2807
|
+
height: 28px;
|
|
2808
|
+
}
|
|
2963
2809
|
}
|
|
2964
2810
|
|
|
2965
2811
|
.el-dropdown-link {
|
|
@@ -3154,31 +3000,24 @@ export default {
|
|
|
3154
3000
|
}
|
|
3155
3001
|
}
|
|
3156
3002
|
|
|
3157
|
-
.drawPoint, .drawLineString, .drawPolygon,
|
|
3158
|
-
.drawDelete, .drawEdit, .drawConnection,
|
|
3159
3003
|
.zoomIn, .zoomOut, .fitWindow {
|
|
3160
3004
|
padding: 4px;
|
|
3161
3005
|
}
|
|
3162
3006
|
|
|
3163
|
-
.iconSelected {
|
|
3164
|
-
color: var(--el-color-primary-light-5) !important;
|
|
3165
|
-
}
|
|
3166
|
-
|
|
3167
|
-
.inactive {
|
|
3168
|
-
color: #DDDDDD !important;
|
|
3169
|
-
cursor: not-allowed !important;
|
|
3170
|
-
}
|
|
3171
|
-
|
|
3172
3007
|
.yellow-star-legend {
|
|
3173
|
-
|
|
3174
|
-
|
|
3008
|
+
display: block;
|
|
3009
|
+
width: max-content;
|
|
3010
|
+
cursor: default;
|
|
3011
|
+
|
|
3012
|
+
:deep(svg) {
|
|
3013
|
+
display: block;
|
|
3014
|
+
}
|
|
3175
3015
|
}
|
|
3176
3016
|
|
|
3177
3017
|
.settings-group {
|
|
3178
3018
|
bottom: 16px;
|
|
3179
3019
|
position: absolute;
|
|
3180
|
-
transition: all
|
|
3181
|
-
z-index: 10;
|
|
3020
|
+
transition: all var(--el-transition-duration);
|
|
3182
3021
|
&.open {
|
|
3183
3022
|
left: 322px;
|
|
3184
3023
|
}
|
|
@@ -3298,7 +3137,7 @@ export default {
|
|
|
3298
3137
|
width: 300px !important;
|
|
3299
3138
|
}
|
|
3300
3139
|
}
|
|
3301
|
-
transition: all
|
|
3140
|
+
transition: all var(--el-transition-duration);
|
|
3302
3141
|
&.shrink {
|
|
3303
3142
|
transform: scale(0.5);
|
|
3304
3143
|
transform: scale(0.5);
|
|
@@ -3315,7 +3154,7 @@ export default {
|
|
|
3315
3154
|
width: 20px;
|
|
3316
3155
|
height: 14px;
|
|
3317
3156
|
z-index: 9;
|
|
3318
|
-
transition: all
|
|
3157
|
+
transition: all var(--el-transition-duration);
|
|
3319
3158
|
&.shrink {
|
|
3320
3159
|
transform: rotate(0deg);
|
|
3321
3160
|
}
|
|
@@ -3359,7 +3198,21 @@ export default {
|
|
|
3359
3198
|
|
|
3360
3199
|
:deep(.flatmap-popup-popper) {
|
|
3361
3200
|
.maplibregl-popup-tip {
|
|
3201
|
+
margin-bottom: -1px;
|
|
3362
3202
|
border-bottom-color: $app-primary-color;
|
|
3203
|
+
position: relative;
|
|
3204
|
+
|
|
3205
|
+
&::before {
|
|
3206
|
+
content: "";
|
|
3207
|
+
display: block;
|
|
3208
|
+
width: 0;
|
|
3209
|
+
height: 0;
|
|
3210
|
+
border: 10px solid transparent;
|
|
3211
|
+
border-bottom-color: #f3ecf6;
|
|
3212
|
+
position: absolute;
|
|
3213
|
+
top: -9px;
|
|
3214
|
+
left: -10px;
|
|
3215
|
+
}
|
|
3363
3216
|
}
|
|
3364
3217
|
.maplibregl-popup-content {
|
|
3365
3218
|
padding: 6px 4px;
|
|
@@ -3379,18 +3232,6 @@ export default {
|
|
|
3379
3232
|
padding: 0px;
|
|
3380
3233
|
}
|
|
3381
3234
|
|
|
3382
|
-
.bottom-draw-control {
|
|
3383
|
-
background-color: var(--el-color-primary-light-9);
|
|
3384
|
-
padding: 4px 4px 2px 4px;
|
|
3385
|
-
border-style: solid;
|
|
3386
|
-
border-color: var(--el-color-primary-light-5);
|
|
3387
|
-
border-radius: 1rem;
|
|
3388
|
-
position: absolute;
|
|
3389
|
-
right: calc(50vw - 100px);;
|
|
3390
|
-
bottom: 16px;
|
|
3391
|
-
z-index: 10;
|
|
3392
|
-
}
|
|
3393
|
-
|
|
3394
3235
|
.bottom-right-control {
|
|
3395
3236
|
position: absolute;
|
|
3396
3237
|
right: 16px;
|
|
@@ -3437,7 +3278,6 @@ export default {
|
|
|
3437
3278
|
font-weight: 600;
|
|
3438
3279
|
margin-top: 12px;
|
|
3439
3280
|
color: $app-primary-color;
|
|
3440
|
-
transition-delay: 0.9s;
|
|
3441
3281
|
}
|
|
3442
3282
|
&.open {
|
|
3443
3283
|
i {
|
|
@@ -3581,12 +3421,6 @@ export default {
|
|
|
3581
3421
|
}
|
|
3582
3422
|
}
|
|
3583
3423
|
}
|
|
3584
|
-
|
|
3585
|
-
.connection-dialog {
|
|
3586
|
-
position: absolute;
|
|
3587
|
-
z-index: 10;
|
|
3588
|
-
cursor: move;
|
|
3589
|
-
}
|
|
3590
3424
|
</style>
|
|
3591
3425
|
|
|
3592
3426
|
<style lang="scss">
|
|
@@ -3598,4 +3432,24 @@ export default {
|
|
|
3598
3432
|
--el-color-primary-dark-2: var(--el-color-primary);
|
|
3599
3433
|
}
|
|
3600
3434
|
|
|
3601
|
-
|
|
3435
|
+
.flatmap-teleport-popper {
|
|
3436
|
+
&.flatmap-popper.el-popper {
|
|
3437
|
+
padding: 6px 4px;
|
|
3438
|
+
font-family: Asap, sans-serif;
|
|
3439
|
+
font-size: 12px;
|
|
3440
|
+
color: rgb(48, 49, 51);
|
|
3441
|
+
background-color: #f3ecf6;
|
|
3442
|
+
border: 1px solid $app-primary-color;
|
|
3443
|
+
white-space: nowrap;
|
|
3444
|
+
min-width: unset;
|
|
3445
|
+
|
|
3446
|
+
.el-popper__arrow {
|
|
3447
|
+
&:before {
|
|
3448
|
+
border-color: $app-primary-color;
|
|
3449
|
+
background-color: #f3ecf6;
|
|
3450
|
+
}
|
|
3451
|
+
}
|
|
3452
|
+
}
|
|
3453
|
+
}
|
|
3454
|
+
|
|
3455
|
+
</style>
|