@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abi-software/map-utilities",
3
- "version": "1.2.1-beta.2",
3
+ "version": "1.2.1-beta.3",
4
4
  "files": [
5
5
  "dist/*",
6
6
  "src/*",
@@ -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
- // Show error for 3 seconds
434
- setTimeout(() => {
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:active',
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 (label && node.isNode() && node.selected()) {
416
+ if (show) {
417
+ node.addClass('active')
418
+ } else {
419
+ node.removeClass('active')
421
420
  label = ''
422
421
  setTimeout(() => {
423
422
  node.unselect()
@@ -11,7 +11,7 @@
11
11
  <el-input
12
12
  class="tree-filter-input"
13
13
  v-model="filterText"
14
- placeholder="Filter keyword"
14
+ :placeholder="'Filter ' + title"
15
15
  />
16
16
  </div>
17
17
  </el-col>