Stay organized with collections
Save and categorize content based on your preferences.
blockly > Events > CommentMove > setOldCoordinate
Override the location before the move. Use this if you don't create the event until the end of the move, but you know the original location.
Signature:
setOldCoordinate(xy: Coordinate): void;
Parameters
Parameter |
Type |
Description |
xy |
Coordinate |
The location before the move, in workspace coordinates. |
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\u003eThis method updates the recorded starting position of a comment move event.\u003c/p\u003e\n"],["\u003cp\u003eIt's used when the event is created after the move, allowing you to specify the comment's original location using workspace coordinates.\u003c/p\u003e\n"],["\u003cp\u003eThe method takes a \u003ccode\u003eCoordinate\u003c/code\u003e object as input, representing the comment's location before the move.\u003c/p\u003e\n"]]],["The `setOldCoordinate` method, part of the `CommentMove` event, allows specifying a comment's original location before it was moved. It takes a `Coordinate` object (`xy`) as input, representing the pre-move position in workspace coordinates. This method is useful when the event is created after the move but the initial position is known. The method does not return any value.\n"],null,["[blockly](./blockly.md) \\\u003e [Events](./blockly.events_namespace.md) \\\u003e [CommentMove](./blockly.events_namespace.commentmove_class.md) \\\u003e [setOldCoordinate](./blockly.events_namespace.commentmove_class.setoldcoordinate_1_method.md)\n\nEvents.CommentMove.setOldCoordinate() method\n\nOverride the location before the move. Use this if you don't create the event until the end of the move, but you know the original location.\n\n**Signature:** \n\n setOldCoordinate(xy: Coordinate): void;\n\nParameters\n\n| Parameter | Type | Description |\n|-----------|-------------------------------------------------------------|---------------------------------------------------------|\n| xy | [Coordinate](./blockly.utils_namespace.coordinate_class.md) | The location before the move, in workspace coordinates. |\n\n**Returns:**\n\nvoid"]]