blockly > BlockSvg > setEnabled
BlockSvg.setEnabled() method
v11 - Set whether the block is manually enabled or disabled. The user can toggle whether a block is disabled from a context menu option. A block may still be disabled for other reasons even if the user attempts to manually enable it, such as when the block is in an invalid location. This method is deprecated and setDisabledReason should be used instead.
Signature:
setEnabled(enabled: boolean): void;
Parameters
Parameter | Type | Description |
---|---|---|
enabled | boolean | True if enabled. |
Returns:
void