Skip to content

Commit

Permalink
fix(ui): disable move tool when staging
Browse files Browse the repository at this point in the history
  • Loading branch information
psychedelicious authored and hipsterusername committed Nov 1, 2024
1 parent 40f7b0d commit 26f95d6
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,13 @@ export class CanvasEntityTransformer extends CanvasModuleBase {
syncInteractionState = () => {
this.log.trace('Syncing interaction state');

if (this.manager.stagingArea.$isStaging.get()) {
// While staging, the layer should not be interactable
this.parent.konva.layer.listening(false);
this._setInteractionMode('off');
return;
}

if (this.parent.segmentAnything?.$isSegmenting.get()) {
// When segmenting, the layer should listen but the transformer should not be interactable
this.parent.konva.layer.listening(true);
Expand Down

0 comments on commit 26f95d6

Please sign in to comment.