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:
Chang Min Bark
2024-09-03 23:12:40 +07:00
committed by GitHub
parent 074a549f09
commit 4d0fd5db79
2 changed files with 10 additions and 2 deletions

View File

@@ -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
);
}
/**

View File

@@ -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 {