Skip to content
Snippets Groups Projects
Commit 66eee7de authored by Lukas Pravda's avatar Lukas Pravda
Browse files

fix node reinitialisation

parent b963cff2
No related branches found
No related tags found
No related merge requests found
......@@ -387,12 +387,15 @@ class Visualization {
this.depictionRoot.selectAll('*').remove();
this.depiction = undefined;
this.nullNodesPositions();
this.setupScene().then(() => this.centerScene());
}
else if (this.depiction === undefined) {
this.nullNodesPositions();
this.setupScene().then(() => this.centerScene());
}
else {
this.nullNodesPositions();
this.setupLigandScene().then(() => this.centerScene());
}
......@@ -485,6 +488,16 @@ class Visualization {
return 'blank.svg';
}
private nullNodesPositions() {
this.presentBindingSite.interactionNodes.forEach((x: Model.InteractionNode) => {
if (!x.static) {
x.fx = null;
x.fy = null;
}
});
}
// #region fire events
//https://stackoverflow.com/questions/40722344/understanding-d3-with-an-example-mouseover-mouseup-with-multiple-arguments
......
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