Stay organized with collections
Save and categorize content based on your preferences.
blockly > blockRendering > PathObject > updateShapeForInputHighlight
Add or remove styling that shows that if the dragging block is dropped, this block will be connected to the input.
Signature:
updateShapeForInputHighlight(_conn: Connection, _enable: boolean): void;
Parameters
Parameter |
Type |
Description |
_conn |
Connection |
The connection on the input to highlight. |
_enable |
boolean |
True if styling should be added. |
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\u003eupdateShapeForInputHighlight\u003c/code\u003e method visually indicates whether a dragged block, if dropped, will connect to a specific input.\u003c/p\u003e\n"],["\u003cp\u003eThis method modifies the appearance of a block to highlight the connection point if a connection is possible, and removes the highlight if not.\u003c/p\u003e\n"],["\u003cp\u003eIt takes the connection point and a boolean value indicating whether to add or remove the styling as parameters.\u003c/p\u003e\n"],["\u003cp\u003eThis method belongs to the \u003ccode\u003ePathObject\u003c/code\u003e class within the \u003ccode\u003eblockRendering\u003c/code\u003e namespace of the Blockly library.\u003c/p\u003e\n"]]],["The `updateShapeForInputHighlight` method within `blockRendering.PathObject` modifies the styling of a block to indicate a potential connection. It accepts two parameters: `_conn`, a `Connection` object representing the input connection, and `_enable`, a boolean determining whether to add or remove the highlighting style. If `_enable` is true, it adds styling; otherwise, it removes it. The method's return type is void, signifying it does not return any value.\n"],null,["[blockly](./blockly.md) \\\u003e [blockRendering](./blockly.blockrendering_namespace.md) \\\u003e [PathObject](./blockly.blockrendering_namespace.pathobject_class.md) \\\u003e [updateShapeForInputHighlight](./blockly.blockrendering_namespace.pathobject_class.updateshapeforinputhighlight_1_method.md)\n\nblockRendering.PathObject.updateShapeForInputHighlight() method\n\nAdd or remove styling that shows that if the dragging block is dropped, this block will be connected to the input.\n\n**Signature:** \n\n updateShapeForInputHighlight(_conn: Connection, _enable: boolean): void;\n\nParameters\n\n| Parameter | Type | Description |\n|-----------|---------------------------------------------|-------------------------------------------|\n| _conn | [Connection](./blockly.connection_class.md) | The connection on the input to highlight. |\n| _enable | boolean | True if styling should be added. |\n\n**Returns:**\n\nvoid"]]