Link labels

This commit is contained in:
Ian Gulliver
2019-07-10 20:03:05 +00:00
parent 245bbb86f4
commit 78436cd98c
4 changed files with 72 additions and 3 deletions

View File

@@ -7,6 +7,7 @@ class Layout {
this.nodesByPos_ = new StringMap();
this.nodesByGraphNode_ = new Map();
this.linksByPos_ = new StringMap();
this.labelsByPos_ = new StringMap();
this.links_ = [];
this.setInitialPositions();
@@ -229,7 +230,8 @@ class Layout {
for (let link of links) {
this.links_.push(
new LayoutLink(link.from, link.to, link.label,
this.nodesByPos_, this.linksByPos_));
this.nodesByPos_, this.linksByPos_,
this.labelsByPos_));
}
for (let link of this.links_) {