Make nodes selectable from the grid

This commit is contained in:
Ian Gulliver
2019-07-11 05:12:08 +00:00
parent 15ad72dc0a
commit ea5e3cb7e1
15 changed files with 50 additions and 4 deletions

View File

@@ -1,7 +1,8 @@
class LayoutLink {
constructor(from, to, label, highlight, nodesByPos, linksByPos, labelsByPos) {
constructor(from, to, id, label, highlight, nodesByPos, linksByPos, labelsByPos) {
this.from_ = from;
this.to_ = to;
this.id_ = id;
this.label_ = label;
this.highlight_ = highlight;
this.nodesByPos_ = nodesByPos;
@@ -234,6 +235,7 @@ class LayoutLink {
type: 'line',
pos: Array.from(this.path[i]),
cls: `i${inPoint}o${outPoint}`,
id: this.id_,
highlight: this.highlight_,
});
}