fix: comment move events and snapping (#8127)

This commit is contained in:
Beka Westberg
2024-05-17 15:26:23 +00:00
committed by GitHub
parent 280568e66e
commit 44db3edce3
2 changed files with 5 additions and 5 deletions

View File

@@ -147,7 +147,6 @@ export class RenderedWorkspaceComment
override moveTo(location: Coordinate, reason?: string[] | undefined): void {
super.moveTo(location, reason);
this.view.moveTo(location);
this.snapToGrid();
}
/**
@@ -218,7 +217,6 @@ export class RenderedWorkspaceComment
/** Ends the drag on the comment. */
endDrag(): void {
this.snapToGrid();
this.dragStrategy.endDrag();
}

View File

@@ -42,13 +42,15 @@ export class CommentDragStrategy implements IDragStrategy {
endDrag(): void {
this.fireMoveEvent();
this.workspace.setResizesEnabled(true);
eventUtils.setGroup(false);
this.workspace
.getLayerManager()
?.moveOffDragLayer(this.comment, layers.BLOCK);
this.comment.setDragging(false);
this.comment.snapToGrid();
this.workspace.setResizesEnabled(true);
eventUtils.setGroup(false);
}
private fireMoveEvent() {