blockly > Connection > setShadowState
Connection.setShadowState() method
Changes the connection's shadow block.
Signature:
setShadowState(shadowState: blocks.State | null): void;
Parameters
Parameter |
Type |
Description |
shadowState |
blocks.State | null |
An state represetation of the block or null. |
Returns:
void
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[null,null,["Last updated 2024-09-18 UTC."],[[["The `Connection.setShadowState()` method updates a connection's associated shadow block using a provided state representation."],["It accepts a `shadowState` parameter, which can be a `blocks.State` object containing the shadow block's configuration or null to remove the shadow."],["Calling this method modifies the connection directly and doesn't return any value."]]],["The `setShadowState()` method modifies a connection's shadow block. It accepts a single parameter, `shadowState`, which can be either a `blocks.State` object (representing the desired block's state) or `null`. This method effectively updates the connection's associated shadow block to reflect the provided state or removes it entirely when null is passed. The method does not return any value.\n"]]