mirror of
https://github.com/google/blockly.git
synced 2026-01-10 02:17:09 +01:00
fix: block_svg disable/enable ops lead to unsync state and render (#6989)
* fix: disable/enable block_svg downstream blocks * fix: disable/enable block_svg improve
This commit is contained in:
@@ -947,7 +947,12 @@ export class BlockSvg extends Block implements IASTNodeLocationSvg,
|
||||
*/
|
||||
updateDisabled() {
|
||||
const disabled = !this.isEnabled() || this.getInheritedDisabled();
|
||||
if (this.visuallyDisabled === disabled) return;
|
||||
|
||||
if (this.visuallyDisabled === disabled) {
|
||||
this.getNextBlock()?.updateDisabled();
|
||||
return;
|
||||
}
|
||||
|
||||
this.applyColour();
|
||||
this.visuallyDisabled = disabled;
|
||||
for (const child of this.getChildren(false)) {
|
||||
|
||||
Reference in New Issue
Block a user