Skip to content

Commit

Permalink
fix: undo while connecting
Browse files Browse the repository at this point in the history
Closes #67
  • Loading branch information
ca-d committed Nov 17, 2023
1 parent 4f3c1c4 commit 76a6e8a
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion oscd-designer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,19 @@ export default class Designer extends LitElement {
doc!: XMLDocument;

@property()
editCount = -1;
get editCount(): number {
return this._editCount;
}

set editCount(value: number) {
this.connecting = undefined;
if (!this.resizing?.parentElement) this.resizing = undefined;
if (!this.placingLabel?.parentElement) this.placingLabel = undefined;
this._editCount = value;
}

@state()
private _editCount = -1;

@state()
gridSize = 32;
Expand Down

0 comments on commit 76a6e8a

Please sign in to comment.