Stay organized with collections
Save and categorize content based on your preferences.
blockly > dragging > CommentDragStrategy
Signature:
export declare class CommentDragStrategy implements IDragStrategy
Implements: IDragStrategy
Constructors
Constructor |
Modifiers |
Description |
(constructor)(comment) |
|
Constructs a new instance of the CommentDragStrategy class |
Methods
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\u003eCommentDragStrategy\u003c/code\u003e class in Blockly manages the dragging behavior of workspace comments.\u003c/p\u003e\n"],["\u003cp\u003eIt implements the \u003ccode\u003eIDragStrategy\u003c/code\u003e interface and provides methods for controlling the drag process, such as \u003ccode\u003estartDrag\u003c/code\u003e, \u003ccode\u003edrag\u003c/code\u003e, \u003ccode\u003eendDrag\u003c/code\u003e, and \u003ccode\u003erevertDrag\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThis class determines if a comment is movable using the \u003ccode\u003eisMovable\u003c/code\u003e method and handles updating the comment's position during the drag.\u003c/p\u003e\n"],["\u003cp\u003eA new \u003ccode\u003eCommentDragStrategy\u003c/code\u003e instance is created using its constructor, taking the comment block as an argument.\u003c/p\u003e\n"]]],[],null,["[blockly](./blockly.md) \\\u003e [dragging](./blockly.dragging_namespace.md) \\\u003e [CommentDragStrategy](./blockly.dragging_namespace.commentdragstrategy_class.md)\n\ndragging.CommentDragStrategy class\n----------------------------------\n\n**Signature:** \n\n export declare class CommentDragStrategy implements IDragStrategy \n\n**Implements:** [IDragStrategy](./blockly.idragstrategy_interface.md)\n\nConstructors\n------------\n\n| Constructor | Modifiers | Description |\n|-----------------------------------------------------------------------------------------------------------------|-----------|--------------------------------------------------------------|\n| [(constructor)(comment)](./blockly.dragging_namespace.commentdragstrategy_class._constructor__1_constructor.md) | | Constructs a new instance of the `CommentDragStrategy` class |\n\nMethods\n-------\n\n| Method | Modifiers | Description |\n|-----------------------------------------------------------------------------------------------|-----------|-------------|\n| [drag(newLoc)](./blockly.dragging_namespace.commentdragstrategy_class.drag_1_method.md) | | |\n| [endDrag()](./blockly.dragging_namespace.commentdragstrategy_class.enddrag_1_method.md) | | |\n| [isMovable()](./blockly.dragging_namespace.commentdragstrategy_class.ismovable_1_method.md) | | |\n| [revertDrag()](./blockly.dragging_namespace.commentdragstrategy_class.revertdrag_1_method.md) | | |\n| [startDrag()](./blockly.dragging_namespace.commentdragstrategy_class.startdrag_1_method.md) | | |"]]