mirror of
https://github.com/google/blockly.git
synced 2026-01-09 18:10:08 +01:00
fix: comment move events and snapping (#8127)
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user