Stay organized with collections
Save and categorize content based on your preferences.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-18 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eConnection.setShadowState()\u003c/code\u003e method updates a connection's associated shadow block using a provided state representation.\u003c/p\u003e\n"],["\u003cp\u003eIt accepts a \u003ccode\u003eshadowState\u003c/code\u003e parameter, which can be a \u003ccode\u003eblocks.State\u003c/code\u003e object containing the shadow block's configuration or null to remove the shadow.\u003c/p\u003e\n"],["\u003cp\u003eCalling this method modifies the connection directly and doesn't return any value.\u003c/p\u003e\n"]]],["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"],null,["[blockly](./blockly.md) \\\u003e [Connection](./blockly.connection_class.md) \\\u003e [setShadowState](./blockly.connection_class.setshadowstate_1_method.md)\n\nConnection.setShadowState() method\n----------------------------------\n\nChanges the connection's shadow block.\n\n**Signature:** \n\n setShadowState(shadowState: blocks.State | null): void;\n\nParameters\n----------\n\n| Parameter | Type | Description |\n|-------------|-----------------------------------------------------------------------------------------------|----------------------------------------------|\n| shadowState | [blocks.State](./blockly.serialization_namespace.blocks_namespace.state_interface.md) \\| null | An state represetation of the block or null. |\n\n**Returns:**\n\nvoid"]]