fix: dragging and disposing of shadows (#8172)

* Revert "fix: dragging blocks by shadows to delete (#8138)"

This reverts commit 3fd749205f.

* fix: dragging shadows
This commit is contained in:
Beka Westberg
2024-05-28 17:28:16 +00:00
committed by GitHub
parent 933e210037
commit 6e4ba00be5
4 changed files with 73 additions and 33 deletions

View File

@@ -675,17 +675,6 @@ export class Block implements IASTNodeLocation {
return block;
}
/**
* Returns this block if it is a shadow block, or the first non-shadow parent.
*
* @internal
*/
getFirstNonShadowBlock(): this {
if (!this.isShadow()) return this;
// We can assert the parent is non-null because shadows must have parents.
return this.getParent()!.getFirstNonShadowBlock();
}
/**
* Find all the blocks that are directly nested inside this one.
* Includes value and statement inputs, as well as any following statement.