تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
blockly > السحب > أداة السحب
فئة dragging.Dragger
Signature:
export declare class Dragger implements IDragger
الأدوات المستخدَمة: IDragger
الشركات المصنِّعة
الخصائص
الطُرق
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-07-25 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-25 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eThe \u003ccode\u003eDragger\u003c/code\u003e class in Blockly manages the dragging behavior of elements within a workspace.\u003c/p\u003e\n"],["\u003cp\u003eIt implements the \u003ccode\u003eIDragger\u003c/code\u003e interface and provides methods for handling drag start, drag, and drag end events.\u003c/p\u003e\n"],["\u003cp\u003eDragger calculates element positions during dragging, updates the drag target, and determines if the draggable should return to its starting position or be deleted.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can extend or customize this class to modify the drag-and-drop functionality in Blockly applications.\u003c/p\u003e\n"]]],[],null,["[blockly](./blockly.md) \\\u003e [dragging](./blockly.dragging_namespace.md) \\\u003e [Dragger](./blockly.dragging_namespace.dragger_class.md)\n\ndragging.Dragger class\n----------------------\n\n**Signature:** \n\n export declare class Dragger implements IDragger \n\n**Implements:** [IDragger](./blockly.idragger_interface.md)\n\nConstructors\n------------\n\n| Constructor | Modifiers | Description |\n|------------------------------------------------------------------------------------------------------------------|-----------|--------------------------------------------------|\n| [(constructor)(draggable, workspace)](./blockly.dragging_namespace.dragger_class._constructor__1_constructor.md) | | Constructs a new instance of the `Dragger` class |\n\nProperties\n----------\n\n| Property | Modifiers | Type | Description |\n|---------------------------------------------------------------------------------|-------------|-------------------------------------------------------------|-------------|\n| [draggable](./blockly.dragging_namespace.dragger_class.draggable_property.md) | `protected` | [IDraggable](./blockly.idraggable_interface.md) | |\n| [dragTarget](./blockly.dragging_namespace.dragger_class.dragtarget_property.md) | `protected` | [IDragTarget](./blockly.idragtarget_interface.md) \\| null | |\n| [startLoc](./blockly.dragging_namespace.dragger_class.startloc_property.md) | `protected` | [Coordinate](./blockly.utils_namespace.coordinate_class.md) | |\n| [workspace](./blockly.dragging_namespace.dragger_class.workspace_property.md) | `protected` | [WorkspaceSvg](./blockly.workspacesvg_class.md) | |\n\nMethods\n-------\n\n| Method | Modifiers | Description |\n|-----------------------------------------------------------------------------------------------------------------------|-------------|-------------------------------------------------------------------------------------------------|\n| [onDrag(e, totalDelta)](./blockly.dragging_namespace.dragger_class.ondrag_1_method.md) | | Handles calculating where the element should actually be moved to. |\n| [onDragEnd(e)](./blockly.dragging_namespace.dragger_class.ondragend_1_method.md) | | Handles any drag cleanup. |\n| [onDragStart(e)](./blockly.dragging_namespace.dragger_class.ondragstart_1_method.md) | | Handles any drag startup. |\n| [pixelsToWorkspaceUnits(pixelCoord)](./blockly.dragging_namespace.dragger_class.pixelstoworkspaceunits_1_method.md) | `protected` | |\n| [shouldReturnToStart(e, rootDraggable)](./blockly.dragging_namespace.dragger_class.shouldreturntostart_1_method.md) | `protected` | Returns true if we should return the draggable to its original location at the end of the drag. |\n| [updateDragTarget(e)](./blockly.dragging_namespace.dragger_class.updatedragtarget_1_method.md) | `protected` | Updates the drag target under the pointer (if there is one). |\n| [wouldDeleteDraggable(e, rootDraggable)](./blockly.dragging_namespace.dragger_class.woulddeletedraggable_1_method.md) | `protected` | Returns true if we would delete the draggable if it was dropped at the current location. |"]]