Skip to content

Commit

Permalink
fix: esc键
Browse files Browse the repository at this point in the history
  • Loading branch information
army8735 committed Jan 8, 2025
1 parent 469d901 commit c491d41
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/control/Geometry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,6 @@ export default class Geometry {
return;
}
// 直接关,外部框选不关由listener设置keep
this.hide();
listener.cancelEditGeom();
});
}
Expand Down
4 changes: 4 additions & 0 deletions src/control/Listener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1641,6 +1641,9 @@ export default class Listener extends Event {
else if (this.state === State.EDIT_TEXT) {
this.cancelEditText();
}
else if (this.state === State.EDIT_GEOM) {
this.cancelEditGeom();
}
else {
this.selected.splice(0);
this.select.hideSelect();
Expand Down Expand Up @@ -2014,6 +2017,7 @@ export default class Listener extends Event {

cancelEditGeom() {
if (this.state === State.EDIT_GEOM) {
this.geometry.hide();
const node = this.geometry.node;
if (node instanceof Polyline) {
node.checkPointsChange();
Expand Down

0 comments on commit c491d41

Please sign in to comment.