blockly > dragging > Dragger

dragging.Dragger class

Signature:

export declare class Dragger implements IDragger 

Implements: IDragger

Constructors

Constructor Modifiers Description
(constructor)(draggable, workspace) Constructs a new instance of the Dragger class

Properties

Property Modifiers Type Description
draggable protected IDraggable
dragTarget protected IDragTarget | null
startLoc protected Coordinate
workspace protected WorkspaceSvg

Methods

Method Modifiers Description
onDrag(e, totalDelta) Handles calculating where the element should actually be moved to.
onDragEnd(e) Handles any drag cleanup.
onDragStart(e) Handles any drag startup.
pixelsToWorkspaceUnits(pixelCoord) protected
shouldReturnToStart(e, draggable) protected Returns true if we should return the draggable to its original location at the end of the drag.
updateDragTarget(e) protected Updates the drag target under the pointer (if there is one).
wouldDeleteDraggable(e, draggable) protected Returns true if we would delete the draggable if it was dropped at the current location.