11
Layout.js
11
Layout.js
@@ -12,6 +12,7 @@ class Layout {
|
||||
this.setInitialPositions();
|
||||
this.resolveGroups();
|
||||
this.resolveLinks();
|
||||
this.resolveTags();
|
||||
this.setAffinity();
|
||||
while (this.iterate());
|
||||
this.addGroupPos();
|
||||
@@ -74,6 +75,15 @@ class Layout {
|
||||
}
|
||||
}
|
||||
|
||||
resolveTags() {
|
||||
this.tags_ = [];
|
||||
for (let i = 0; i < this.graph_.tags.length; ++i) {
|
||||
let tag = this.graph_.tags[i];
|
||||
let nodes = this.nodesFromGraphNodes(tag.nodes);
|
||||
this.tags_.push(new LayoutTag(tag, nodes, i));
|
||||
}
|
||||
}
|
||||
|
||||
setAffinity() {
|
||||
for (let node of this.nodes_) {
|
||||
node.setAffinity(this.nodesByGraphNode_);
|
||||
@@ -298,3 +308,4 @@ class Layout {
|
||||
<!--# include file="LayoutGroup.js" -->
|
||||
<!--# include file="LayoutLink.js" -->
|
||||
<!--# include file="LayoutNode.js" -->
|
||||
<!--# include file="LayoutTag.js" -->
|
||||
|
||||
Reference in New Issue
Block a user