mirror of
https://github.com/google/blockly.git
synced 2026-01-07 17:10:11 +01:00
fix: dispose performance (#6894)
* fix: improve dispose performance * chore: cleanup dispose functions * chore: split dispose into dispose and disposeInternal * chore: remove unnecessary node removal * fix: remove unnecessary unbinding of event listeners * fix: readd skipping event construction * chore: work on fixing tests * chore: fix remaining test failures * chore: format * chore: typo * fix: first pass of PR comments * chore: remove TODO
This commit is contained in:
@@ -39,6 +39,9 @@ let wobblingBlock: BlockSvg|null = null;
|
||||
* @internal
|
||||
*/
|
||||
export function disposeUiEffect(block: BlockSvg) {
|
||||
// Disposing is going to take so long the animation won't play anyway.
|
||||
if (block.getDescendants(false).length > 100) return;
|
||||
|
||||
const workspace = block.workspace;
|
||||
const svgGroup = block.getSvgRoot();
|
||||
workspace.getAudioManager().play('delete');
|
||||
|
||||
Reference in New Issue
Block a user