Skip to content

Commit 1d4e531

Browse files
committed
Don't allow things in a flyout to be deleted or moved.
1 parent e1441d5 commit 1d4e531

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

core/block.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -791,6 +791,7 @@ export class Block {
791791
isDeletable(): boolean {
792792
return (
793793
this.deletable &&
794+
!this.isInFlyout &&
794795
!this.shadow &&
795796
!this.isDeadOrDying() &&
796797
!this.workspace.isReadOnly()
@@ -824,6 +825,7 @@ export class Block {
824825
isMovable(): boolean {
825826
return (
826827
this.movable &&
828+
!this.isInFlyout &&
827829
!this.shadow &&
828830
!this.isDeadOrDying() &&
829831
!this.workspace.isReadOnly()

core/comments/workspace_comment.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,11 @@ export class WorkspaceComment {
165165
* workspace is read-only.
166166
*/
167167
isMovable() {
168-
return this.isOwnMovable() && !this.workspace.isReadOnly();
168+
return (
169+
this.isOwnMovable() &&
170+
!this.workspace.isReadOnly() &&
171+
!this.workspace.isFlyout
172+
);
169173
}
170174

171175
/**
@@ -189,7 +193,8 @@ export class WorkspaceComment {
189193
return (
190194
this.isOwnDeletable() &&
191195
!this.isDeadOrDying() &&
192-
!this.workspace.isReadOnly()
196+
!this.workspace.isReadOnly() &&
197+
!this.workspace.isFlyout
193198
);
194199
}
195200

0 commit comments

Comments
 (0)