mirror of
https://github.com/google/blockly.git
synced 2026-03-12 08:10:11 +01:00
fix(comments): added workspace comments and comment drag strategy isDeadOrDying() checks (#8532)
* fix: added id to rendered ws comments; made getCommentById public; added blocklyDraggable class to ws comments * fix: added workspace comments and comment drag strategy isDeadOrDying checks * chore: removed .idea files * chore: formatted with prettier
This commit is contained in:
@@ -184,7 +184,11 @@ export class WorkspaceComment {
|
||||
* workspace is read-only.
|
||||
*/
|
||||
isDeletable(): boolean {
|
||||
return this.isOwnDeletable() && !this.workspace.options.readOnly;
|
||||
return (
|
||||
this.isOwnDeletable() &&
|
||||
!this.isDeadOrDying() &&
|
||||
!this.workspace.options.readOnly
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -26,7 +26,11 @@ export class CommentDragStrategy implements IDragStrategy {
|
||||
}
|
||||
|
||||
isMovable(): boolean {
|
||||
return this.comment.isOwnMovable() && !this.workspace.options.readOnly;
|
||||
return (
|
||||
this.comment.isOwnMovable() &&
|
||||
!this.comment.isDeadOrDying() &&
|
||||
!this.workspace.options.readOnly
|
||||
);
|
||||
}
|
||||
|
||||
startDrag(): void {
|
||||
|
||||
Reference in New Issue
Block a user