@abi-software/map-utilities 1.2.1-beta.2 → 1.2.1-beta.3
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 +2675 -2681
- 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 -2
- package/src/components/ConnectivityGraph/graph.js +10 -11
- package/src/components/TreeControls/TreeControls.vue +1 -1
package/package.json
CHANGED
|
@@ -167,6 +167,7 @@ export default {
|
|
|
167
167
|
iconColor: APP_PRIMARY_COLOR,
|
|
168
168
|
zoomEnabled: false,
|
|
169
169
|
connectivityError: null,
|
|
170
|
+
timeoutID: undefined,
|
|
170
171
|
};
|
|
171
172
|
},
|
|
172
173
|
mounted() {
|
|
@@ -430,8 +431,11 @@ export default {
|
|
|
430
431
|
showErrorMessage: function (connectivityError) {
|
|
431
432
|
this.connectivityError = {...connectivityError};
|
|
432
433
|
|
|
433
|
-
|
|
434
|
-
|
|
434
|
+
if (this.timeoutID) {
|
|
435
|
+
clearTimeout(this.timeoutID);
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
this.timeoutID = setTimeout(() => {
|
|
435
439
|
this.connectivityError = null;
|
|
436
440
|
}, ERROR_TIMEOUT);
|
|
437
441
|
},
|
|
@@ -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()
|