Stay organized with collections
Save and categorize content based on your preferences.
blockly > icons > CommentIcon > onLocationChange
Signature:
onLocationChange(blockOrigin: Coordinate): void;
Parameters
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\u003eicons.CommentIcon.onLocationChange()\u003c/code\u003e method updates the comment icon's position when the associated block's location changes.\u003c/p\u003e\n"],["\u003cp\u003eIt takes the block's origin coordinates (\u003ccode\u003eblockOrigin\u003c/code\u003e) as input, which is an instance of the \u003ccode\u003eCoordinate\u003c/code\u003e class.\u003c/p\u003e\n"],["\u003cp\u003eThis method does not return any value (void).\u003c/p\u003e\n"],["\u003cp\u003eIt is responsible for ensuring the comment icon remains visually connected to its corresponding block.\u003c/p\u003e\n"]]],[],null,["[blockly](./blockly.md) \\\u003e [icons](./blockly.icons_namespace.md) \\\u003e [CommentIcon](./blockly.icons_namespace.commenticon_class.md) \\\u003e [onLocationChange](./blockly.icons_namespace.commenticon_class.onlocationchange_1_method.md)\n\nicons.CommentIcon.onLocationChange() method\n-------------------------------------------\n\n**Signature:** \n\n onLocationChange(blockOrigin: Coordinate): void;\n\nParameters\n----------\n\n| Parameter | Type | Description |\n|-------------|-------------------------------------------------------------|-------------|\n| blockOrigin | [Coordinate](./blockly.utils_namespace.coordinate_class.md) | |\n\n**Returns:**\n\nvoid"]]