@abi-software/map-utilities 1.2.1-beta.2 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/map-utilities.js +2270 -2276
- package/dist/map-utilities.umd.cjs +54 -54
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/ConnectivityGraph/ConnectivityGraph.vue +6 -6
- package/src/components/ConnectivityGraph/graph.js +10 -11
- package/src/components/TreeControls/TreeControls.vue +1 -1
package/package.json
CHANGED
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
>
|
|
13
13
|
<el-button
|
|
14
14
|
class="control-button"
|
|
15
|
-
:class="theme"
|
|
16
15
|
size="small"
|
|
17
16
|
@click="reset"
|
|
18
17
|
>
|
|
@@ -30,7 +29,6 @@
|
|
|
30
29
|
>
|
|
31
30
|
<el-button
|
|
32
31
|
class="control-button"
|
|
33
|
-
:class="theme"
|
|
34
32
|
size="small"
|
|
35
33
|
@click="toggleZoom"
|
|
36
34
|
>
|
|
@@ -53,7 +51,6 @@
|
|
|
53
51
|
>
|
|
54
52
|
<el-button
|
|
55
53
|
class="control-button"
|
|
56
|
-
:class="theme"
|
|
57
54
|
size="small"
|
|
58
55
|
@click="zoomIn"
|
|
59
56
|
>
|
|
@@ -71,7 +68,6 @@
|
|
|
71
68
|
>
|
|
72
69
|
<el-button
|
|
73
70
|
class="control-button"
|
|
74
|
-
:class="theme"
|
|
75
71
|
size="small"
|
|
76
72
|
@click="zoomOut"
|
|
77
73
|
>
|
|
@@ -167,6 +163,7 @@ export default {
|
|
|
167
163
|
iconColor: APP_PRIMARY_COLOR,
|
|
168
164
|
zoomEnabled: false,
|
|
169
165
|
connectivityError: null,
|
|
166
|
+
timeoutID: undefined,
|
|
170
167
|
};
|
|
171
168
|
},
|
|
172
169
|
mounted() {
|
|
@@ -430,8 +427,11 @@ export default {
|
|
|
430
427
|
showErrorMessage: function (connectivityError) {
|
|
431
428
|
this.connectivityError = {...connectivityError};
|
|
432
429
|
|
|
433
|
-
|
|
434
|
-
|
|
430
|
+
if (this.timeoutID) {
|
|
431
|
+
clearTimeout(this.timeoutID);
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
this.timeoutID = setTimeout(() => {
|
|
435
435
|
this.connectivityError = null;
|
|
436
436
|
}, ERROR_TIMEOUT);
|
|
437
437
|
},
|
|
@@ -258,14 +258,7 @@ const GRAPH_STYLE = [
|
|
|
258
258
|
}
|
|
259
259
|
},
|
|
260
260
|
{
|
|
261
|
-
'selector': 'node
|
|
262
|
-
'style': {
|
|
263
|
-
'border-color': APP_PRIMARY_COLOR,
|
|
264
|
-
'border-width': 2
|
|
265
|
-
}
|
|
266
|
-
},
|
|
267
|
-
{
|
|
268
|
-
'selector': 'node:selected',
|
|
261
|
+
'selector': 'node.active',
|
|
269
262
|
'style': {
|
|
270
263
|
'border-color': APP_PRIMARY_COLOR,
|
|
271
264
|
'background-color': BG_COLOR,
|
|
@@ -350,7 +343,6 @@ class CytoscapeGraph extends EventTarget
|
|
|
350
343
|
}).on('mouseover', 'node', this.overNode.bind(this))
|
|
351
344
|
.on('mouseout', 'node', this.exitNode.bind(this))
|
|
352
345
|
.on('position', 'node', this.moveNode.bind(this))
|
|
353
|
-
.on('tap', this.tapNode.bind(this))
|
|
354
346
|
|
|
355
347
|
this.tooltip = document.createElement('div')
|
|
356
348
|
this.tooltip.className = 'cy-graph-tooltip'
|
|
@@ -393,6 +385,8 @@ class CytoscapeGraph extends EventTarget
|
|
|
393
385
|
this.tooltip.hidden = false
|
|
394
386
|
|
|
395
387
|
this.checkRightBoundary(event.renderedPosition.x)
|
|
388
|
+
|
|
389
|
+
this.tapNode(event, true)
|
|
396
390
|
}
|
|
397
391
|
|
|
398
392
|
moveNode(event)
|
|
@@ -408,16 +402,21 @@ class CytoscapeGraph extends EventTarget
|
|
|
408
402
|
//==============
|
|
409
403
|
{
|
|
410
404
|
this.tooltip.hidden = true
|
|
405
|
+
|
|
406
|
+
this.tapNode(event, false)
|
|
411
407
|
}
|
|
412
408
|
|
|
413
|
-
tapNode(event)
|
|
409
|
+
tapNode(event, show)
|
|
414
410
|
//============
|
|
415
411
|
{
|
|
416
412
|
const node = event.target
|
|
417
413
|
const data = node.data()
|
|
418
414
|
let { label } = data
|
|
419
415
|
|
|
420
|
-
if (
|
|
416
|
+
if (show) {
|
|
417
|
+
node.addClass('active')
|
|
418
|
+
} else {
|
|
419
|
+
node.removeClass('active')
|
|
421
420
|
label = ''
|
|
422
421
|
setTimeout(() => {
|
|
423
422
|
node.unselect()
|