Skip to content

Commit

Permalink
fix: hide highlight and boundary only when necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
rienheuver committed Oct 25, 2023
1 parent 3b7e45c commit 5bdab4d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions lib/classes/DragContainer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ export class DragContainer extends Container {
public hideBoundary(): void {
this.boundaryGraphic.visible = false;
}
public hasBoundary(): boolean {
return this.boundaryGraphic.visible;
}

public updateBoundary(visible = true): void {
this.boundaryGraphic.clear();
Expand Down
4 changes: 2 additions & 2 deletions lib/classes/GroupingApplication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -282,10 +282,10 @@ export class GroupingApplication extends Application<HTMLCanvasElement> {
return true;
}
});
if (!isOverlaying) {
if (!isOverlaying && active.hasOverlayBlock()) {
active.unsetOverlayBlock();
}
if (active.nearFusing()) {
if (active.nearFusing() && active.hasBoundary()) {
active.hideBoundary();
}
}
Expand Down

0 comments on commit 5bdab4d

Please sign in to comment.