mirror of
https://github.com/google/blockly.git
synced 2026-01-10 02:17:09 +01:00
Don't allow things in a flyout to be deleted or moved.
This commit is contained in:
@@ -791,6 +791,7 @@ export class Block {
|
||||
isDeletable(): boolean {
|
||||
return (
|
||||
this.deletable &&
|
||||
!this.isInFlyout &&
|
||||
!this.shadow &&
|
||||
!this.isDeadOrDying() &&
|
||||
!this.workspace.isReadOnly()
|
||||
@@ -824,6 +825,7 @@ export class Block {
|
||||
isMovable(): boolean {
|
||||
return (
|
||||
this.movable &&
|
||||
!this.isInFlyout &&
|
||||
!this.shadow &&
|
||||
!this.isDeadOrDying() &&
|
||||
!this.workspace.isReadOnly()
|
||||
|
||||
@@ -165,7 +165,11 @@ export class WorkspaceComment {
|
||||
* workspace is read-only.
|
||||
*/
|
||||
isMovable() {
|
||||
return this.isOwnMovable() && !this.workspace.isReadOnly();
|
||||
return (
|
||||
this.isOwnMovable() &&
|
||||
!this.workspace.isReadOnly() &&
|
||||
!this.workspace.isFlyout
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -189,7 +193,8 @@ export class WorkspaceComment {
|
||||
return (
|
||||
this.isOwnDeletable() &&
|
||||
!this.isDeadOrDying() &&
|
||||
!this.workspace.isReadOnly()
|
||||
!this.workspace.isReadOnly() &&
|
||||
!this.workspace.isFlyout
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user