Skip to content

Commit

Permalink
fix: Update the ActiveHistory of the PointOperation
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerwin-L committed Jan 5, 2022
1 parent d99740b commit bcca28b
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ class PointOperation extends BasicToolOperation {
public clearResult() {
this.setPointList([]);
this.setSelectedID(undefined);
this.history.pushHistory([]);

this.hoverID = '';
this.render();
}
Expand Down Expand Up @@ -458,8 +460,9 @@ class PointOperation extends BasicToolOperation {
}

this.hoverID = newDrawingPoint.id;
this.history.pushHistory(this.pointList);
this.setPointList([...this.pointList, newDrawingPoint]);
const newPointList = [...this.pointList, newDrawingPoint];
this.setPointList(newPointList);
this.history.pushHistory(newPointList);
this.setSelectedID(newDrawingPoint.id);
}

Expand Down

0 comments on commit bcca28b

Please sign in to comment.