@abi-software/map-utilities 1.1.3-beta.8 → 1.1.3-beta.9
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
package/src/App.vue
CHANGED
|
@@ -39,6 +39,9 @@ const drawnTypes = [
|
|
|
39
39
|
{ value: "None", label: "None" },
|
|
40
40
|
];
|
|
41
41
|
const showConnectivityGraph = ref(false);
|
|
42
|
+
// const connectivityGraphEntry = "ilxtr:neuron-type-aacar-13";
|
|
43
|
+
const connectivityGraphEntry = "ilxtr:sparc-nlp/kidney/134";
|
|
44
|
+
const mapServer = "https://mapcore-demo.org/curation/flatmap/";
|
|
42
45
|
|
|
43
46
|
onMounted(() => {
|
|
44
47
|
console.log("🚀 ~ onMounted ~ appRef:", appRef.value);
|
|
@@ -513,8 +516,8 @@ function changeHover(value) {
|
|
|
513
516
|
/>
|
|
514
517
|
<ConnectivityGraph
|
|
515
518
|
v-if="showConnectivityGraph"
|
|
516
|
-
entry="
|
|
517
|
-
map-server="
|
|
519
|
+
:entry="connectivityGraphEntry"
|
|
520
|
+
:map-server="mapServer"
|
|
518
521
|
/>
|
|
519
522
|
</div>
|
|
520
523
|
</template>
|
|
@@ -385,25 +385,29 @@ export default {
|
|
|
385
385
|
}
|
|
386
386
|
|
|
387
387
|
.node-key {
|
|
388
|
-
|
|
389
|
-
|
|
388
|
+
padding: 0.5rem;
|
|
389
|
+
font-size: 12px;
|
|
390
|
+
border: 1px solid var(--el-border-color);
|
|
390
391
|
background-color: rgba(#f7faff, 0.85);
|
|
391
392
|
|
|
392
393
|
div div {
|
|
393
394
|
width: 90px;
|
|
395
|
+
display: flex;
|
|
396
|
+
align-items: center;
|
|
397
|
+
justify-content: space-between;
|
|
394
398
|
}
|
|
395
399
|
}
|
|
396
400
|
|
|
397
401
|
.key-head {
|
|
398
402
|
text-align: center;
|
|
399
403
|
font-weight: bold;
|
|
400
|
-
border-bottom: 1px solid
|
|
404
|
+
border-bottom: 1px solid var(--el-border-color);
|
|
401
405
|
padding-bottom: 4px;
|
|
402
|
-
margin-bottom:
|
|
406
|
+
margin-bottom: 0.5rem;
|
|
403
407
|
}
|
|
404
408
|
|
|
405
409
|
.key-box {
|
|
406
|
-
|
|
410
|
+
display: block;
|
|
407
411
|
width: 12px;
|
|
408
412
|
height: 12px;
|
|
409
413
|
}
|
|
@@ -418,10 +422,13 @@ export default {
|
|
|
418
422
|
}
|
|
419
423
|
|
|
420
424
|
.control-button {
|
|
425
|
+
width: 24px;
|
|
426
|
+
height: 24px;
|
|
421
427
|
margin: 0 !important;
|
|
422
|
-
padding: 0
|
|
423
|
-
font-size:
|
|
428
|
+
padding: 0 !important;
|
|
429
|
+
font-size: 16px !important;
|
|
424
430
|
border-color: $app-primary-color !important;
|
|
431
|
+
border-radius: 50%;
|
|
425
432
|
background: $app-primary-color !important;
|
|
426
433
|
transition: all 0.25s ease;
|
|
427
434
|
|
|
@@ -434,10 +441,6 @@ export default {
|
|
|
434
441
|
&:active {
|
|
435
442
|
box-shadow: none !important;
|
|
436
443
|
}
|
|
437
|
-
|
|
438
|
-
&:hover {
|
|
439
|
-
background: $lightPurple !important;
|
|
440
|
-
}
|
|
441
444
|
}
|
|
442
445
|
|
|
443
446
|
:deep(.cy-graph-tooltip) {
|
|
@@ -200,6 +200,15 @@ const GRAPH_STYLE = [
|
|
|
200
200
|
}
|
|
201
201
|
]
|
|
202
202
|
|
|
203
|
+
function capitalizeLabels(input) {
|
|
204
|
+
return input.split('\n').map(label => {
|
|
205
|
+
if (label && label[0] >= 'a' && label[0] <= 'z') {
|
|
206
|
+
return label.charAt(0).toUpperCase() + label.slice(1)
|
|
207
|
+
}
|
|
208
|
+
return label
|
|
209
|
+
}).join('\n')
|
|
210
|
+
}
|
|
211
|
+
|
|
203
212
|
//==============================================================================
|
|
204
213
|
|
|
205
214
|
class CytoscapeGraph extends EventTarget
|
|
@@ -254,10 +263,14 @@ class CytoscapeGraph extends EventTarget
|
|
|
254
263
|
//==============
|
|
255
264
|
{
|
|
256
265
|
const node = event.target
|
|
257
|
-
|
|
266
|
+
const label = capitalizeLabels(node.data().label)
|
|
267
|
+
|
|
268
|
+
this.tooltip.innerText = label
|
|
258
269
|
this.tooltip.style.left = `${event.renderedPosition.x}px`
|
|
259
270
|
this.tooltip.style.top = `${event.renderedPosition.y}px`
|
|
271
|
+
this.tooltip.style.maxWidth = '240px'
|
|
260
272
|
this.tooltip.hidden = false
|
|
273
|
+
|
|
261
274
|
this.checkRightBoundary(event.renderedPosition.x)
|
|
262
275
|
}
|
|
263
276
|
|