Optimize redraw

This commit is contained in:
Paulo Gustavo Veiga 2023-01-02 10:57:10 -08:00
parent 160c0e1d94
commit fe8af2f7a5

View File

@ -1260,9 +1260,6 @@ abstract class Topic extends NodeGraph {
this._outgoingLine = this.createConnectionLine(targetTopic); this._outgoingLine = this.createConnectionLine(targetTopic);
this._outgoingLine.setVisibility(this.isVisible()); this._outgoingLine.setVisibility(this.isVisible());
workspace.append(this._outgoingLine); workspace.append(this._outgoingLine);
// Update all the children...
this.getChildren().forEach((t) => t.redraw());
result = true; result = true;
} }
@ -1271,8 +1268,6 @@ abstract class Topic extends NodeGraph {
const connColorChanged = color !== this.getParent()!.getConnectionColor(); const connColorChanged = color !== this.getParent()!.getConnectionColor();
if (connColorChanged) { if (connColorChanged) {
this._outgoingLine.redraw(); this._outgoingLine.redraw();
this.getChildren().forEach((t) => t.redraw());
result = true; result = true;
} }
} }