Skip to content

Commit

Permalink
Merge pull request #799 from biigle/polygon-tool-bug
Browse files Browse the repository at this point in the history
Fix polygon tool bug
  • Loading branch information
mzur authored Mar 12, 2024
2 parents b7cf04f + f194a08 commit c6807fc
Showing 1 changed file with 22 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ export default {
isUsingPolygonFill() {
return this.interactionMode === 'polygonFill';
},
isNotAPolygonTool() {
return !(this.isUsingPolygonBrush || this.isUsingPolygonEraser || this.isUsingPolygonFill);
}
},
methods: {
togglePolygonBrush() {
Expand Down Expand Up @@ -111,19 +114,30 @@ export default {
},
watch: {
isUsingPolygonBrush() {
this.resetCurrentInteraction();
this.togglePolygonBrushInteraction();
if (this.isUsingPolygonBrush) {
this.resetCurrentInteraction();
this.togglePolygonBrushInteraction();
}
},
isUsingPolygonEraser() {
this.resetCurrentInteraction();
this.toggleShiftClickSelectInteraction();
this.togglePolygonEraserInteraction();
if (this.isUsingPolygonEraser) {
this.resetCurrentInteraction();
this.toggleShiftClickSelectInteraction();
this.togglePolygonEraserInteraction();
}
},
isUsingPolygonFill() {
this.resetCurrentInteraction();
this.toggleShiftClickSelectInteraction();
this.togglePolygonFillInteraction();
if (this.isUsingPolygonFill) {
this.resetCurrentInteraction();
this.toggleShiftClickSelectInteraction();
this.togglePolygonFillInteraction();
}
},
isNotAPolygonTool() {
if (this.isNotAPolygonTool) {
this.resetCurrentInteraction();
}
}
},
created() {
Keyboard.on('r', this.togglePolygonEraser, 0, this.listenerSet);
Expand Down

0 comments on commit c6807fc

Please sign in to comment.