Skip to content

Commit

Permalink
Fix bug where interaction is not reset on escape
Browse files Browse the repository at this point in the history
  • Loading branch information
lehecht committed Mar 7, 2024
1 parent c4975cd commit 05f1b08
Showing 1 changed file with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ export default {
isUsingPolygonFill() {
return this.interactionMode === 'polygonFill';
},
isDefault() {
return this.interactionMode === 'default';
}
},
methods: {
togglePolygonBrush() {
Expand Down Expand Up @@ -111,25 +114,30 @@ export default {
},
watch: {
isUsingPolygonBrush() {
if(this.isUsingPolygonBrush){
if (this.isUsingPolygonBrush) {
this.resetCurrentInteraction();
this.togglePolygonBrushInteraction();
}
},
isUsingPolygonEraser() {
if(this.isUsingPolygonEraser){
if (this.isUsingPolygonEraser) {
this.resetCurrentInteraction();
this.toggleShiftClickSelectInteraction();
this.togglePolygonEraserInteraction();
}
},
isUsingPolygonFill() {
if(this.isUsingPolygonFill){
if (this.isUsingPolygonFill) {
this.resetCurrentInteraction();
this.toggleShiftClickSelectInteraction();
this.togglePolygonFillInteraction();
}
},
isDefault() {
if (this.isDefault) {
this.resetCurrentInteraction();
}
}
},
created() {
Keyboard.on('r', this.togglePolygonEraser, 0, this.listenerSet);
Expand Down

0 comments on commit 05f1b08

Please sign in to comment.