fix: disabled render status after serialization (#7650)

* fix: disabled render status after serialization

* chore: format

* chore: better names

* chore: format
This commit is contained in:
Maribeth Bottorff
2023-11-17 15:58:35 -08:00
committed by GitHub
parent bf91422c98
commit e6de8581dd
4 changed files with 139 additions and 6 deletions

View File

@@ -1623,6 +1623,11 @@ export class BlockSvg
if (this.isCollapsed()) {
this.updateCollapsed_();
}
if (!this.isEnabled()) {
this.updateDisabled();
}
this.workspace.getRenderer().render(this);
this.tightenChildrenEfficiently();

View File

@@ -733,7 +733,6 @@ function initBlock(block: Block, rendered: boolean) {
blockSvg.initSvg();
blockSvg.queueRender();
blockSvg.updateDisabled();
// fixes #6076 JSO deserialization doesn't
// set .iconXY_ property so here it will be set

View File

@@ -592,7 +592,6 @@ export function domToBlockInternal(
topBlockSvg.setConnectionTracking(true);
}
}, 1);
topBlockSvg.updateDisabled();
// Allow the scrollbars to resize and move based on the new contents.
// TODO(@picklesrus): #387. Remove when domToBlock avoids resizing.
(workspace as WorkspaceSvg).resizeContents();