Commit 0e411614 authored by Valentin Perrelle's avatar Valentin Perrelle Committed by David Bühler

[dive] display all incoming edges in gray overlay while selected ones remains blueish

parent 5a8c3222
......@@ -297,9 +297,8 @@ class Dive {
for (const dep of data.deps) {
const src = this.cy.$id(dep.src);
const dst = this.cy.$id(dep.dst);
const isRoot = dst?.data('is_root');
this.cy.add({
data: { ...dep, source: dep.src, target: dep.dst, is_root: isRoot },
data: { ...dep, source: dep.src, target: dep.dst },
group: 'edges',
classes: src?.hasClass('new') || dst?.hasClass('new') ? 'new' : '',
});
......@@ -486,8 +485,10 @@ class Dive {
_.some(ele.data().origins, this.selectedLocation)
);
this.cy.$(':selected').forEach(unselect);
this.cy.$('.multiple-selection').removeClass('multiple-selection');
select(node);
const edges = node.incomers('edge');
edges.addClass('multiple-selection');
edges.unselect();
const relevantEdges = edges.filter(hasOrigin);
if (relevantEdges.empty())
......
......@@ -58,18 +58,20 @@
}
},
{
"selector": "edge:selected",
"selector": ".multiple-selection",
"style": {
"color": "#48f",
"overlay-color": "#8bf",
"overlay-color": "#aaa",
"overlay-padding": "10px",
"overlay-opacity": 0.4
}
},
{
"selector": "edge[?is_root]",
"selector": "edge:selected",
"style": {
"width": 4
"color": "#48f",
"overlay-color": "#8bf",
"overlay-padding": "10px",
"overlay-opacity": 0.4
}
},
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment