Performance optimization to avoid order change.

This commit is contained in:
Paulo Gustavo Veiga 2023-03-03 09:36:50 -03:00
parent 90bf53d762
commit c1d45655d3
1 changed files with 4 additions and 1 deletions

View File

@ -934,10 +934,13 @@ abstract class Topic extends NodeGraph {
}
setOrder(value: number): void {
const changed = this.getModel().getOrder() !== value;
const model = this.getModel();
model.setOrder(value);
this.redraw();
if (changed) {
this.redraw();
}
}
connectTo(targetTopic: Topic, canvas: Canvas): void {