@abi-software/map-utilities 1.1.3-beta.6 → 1.1.3-beta.7
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,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="connectivity-graph" v-loading="loading">
|
|
3
|
+
|
|
3
4
|
<div ref="graphCanvas" class="graph-canvas"></div>
|
|
5
|
+
|
|
4
6
|
<div class="control-panel">
|
|
5
7
|
<div class="node-key">
|
|
6
8
|
<div class="key-head">Node type:</div>
|
|
@@ -53,6 +55,11 @@
|
|
|
53
55
|
</el-tooltip>
|
|
54
56
|
</div>
|
|
55
57
|
</div>
|
|
58
|
+
|
|
59
|
+
<div class="connectivity-graph-error" v-if="errorMessage">
|
|
60
|
+
{{ errorMessage }}
|
|
61
|
+
</div>
|
|
62
|
+
|
|
56
63
|
</div>
|
|
57
64
|
</template>
|
|
58
65
|
|
|
@@ -95,6 +102,7 @@ export default {
|
|
|
95
102
|
zoomLockLabel: ZOOM_LOCK_LABEL,
|
|
96
103
|
iconColor: APP_PRIMARY_COLOR,
|
|
97
104
|
zoomEnabled: false,
|
|
105
|
+
errorMessage: '',
|
|
98
106
|
};
|
|
99
107
|
},
|
|
100
108
|
mounted() {
|
|
@@ -184,7 +192,7 @@ export default {
|
|
|
184
192
|
|
|
185
193
|
this.connectivityGraph.on('tap-node', (event) => {
|
|
186
194
|
const { label } = event.detail;
|
|
187
|
-
const labels = label.split(`\n`);
|
|
195
|
+
const labels = label ? label.split(`\n`) : [];
|
|
188
196
|
/**
|
|
189
197
|
* This event is triggered after a node on the connectivity graph is clicked.
|
|
190
198
|
*/
|
|
@@ -345,6 +353,9 @@ export default {
|
|
|
345
353
|
this.zoomLockLabel = this.zoomEnabled ? ZOOM_UNLOCK_LABEL : ZOOM_LOCK_LABEL;
|
|
346
354
|
this.connectivityGraph.enableZoom(!this.zoomEnabled);
|
|
347
355
|
},
|
|
356
|
+
updateErrorMessage: function (message) {
|
|
357
|
+
this.errorMessage = message;
|
|
358
|
+
},
|
|
348
359
|
},
|
|
349
360
|
};
|
|
350
361
|
</script>
|
|
@@ -439,6 +450,19 @@ export default {
|
|
|
439
450
|
z-index: 1;
|
|
440
451
|
}
|
|
441
452
|
|
|
453
|
+
.connectivity-graph-error {
|
|
454
|
+
position: absolute;
|
|
455
|
+
top: 1rem;
|
|
456
|
+
left: 50%;
|
|
457
|
+
transform: translateX(-50%);
|
|
458
|
+
width: fit-content;
|
|
459
|
+
font-size: 12px;
|
|
460
|
+
padding: 0.25rem 0.5rem;
|
|
461
|
+
background-color: var(--el-color-error-light-9);
|
|
462
|
+
border-radius: var(--el-border-radius-small);
|
|
463
|
+
border: 1px solid var(--el-color-error);
|
|
464
|
+
}
|
|
465
|
+
|
|
442
466
|
.visually-hidden {
|
|
443
467
|
clip: rect(0 0 0 0);
|
|
444
468
|
clip-path: inset(50%);
|
|
@@ -227,6 +227,7 @@ class CytoscapeGraph extends EventTarget
|
|
|
227
227
|
.on('mouseout', 'node', this.exitNode.bind(this))
|
|
228
228
|
.on('position', 'node', this.moveNode.bind(this))
|
|
229
229
|
.on('tap', 'node', this.tapNode.bind(this))
|
|
230
|
+
.on('tap', this.tapNode.bind(this))
|
|
230
231
|
|
|
231
232
|
this.tooltip = document.createElement('div')
|
|
232
233
|
this.tooltip.className = 'cy-graph-tooltip'
|