Class: WorkspaceDragger

Constructor

WorkspaceDragger

new WorkspaceDragger(workspace)

Parameter

workspace

The workspace to drag.

Value must not be null.

Property

startScrollXY_

protected

non-null Blockly.utils.Coordinate

The scroll position of the workspace at the beginning of the drag. Coordinate system: pixel coordinates.

Methods

dispose

package

dispose()

Sever all links from this object.

drag

package

drag(currentDragDeltaXY)

Move the workspace based on the most recent mouse movements.

Parameter

currentDragDeltaXY

Blockly.utils.Coordinate

How far the pointer has moved from the position at the start of the drag, in pixel coordinates.

Value must not be null.

endDrag

package

endDrag(currentDragDeltaXY)

Finish dragging the workspace and put everything back where it belongs.

Parameter

currentDragDeltaXY

Blockly.utils.Coordinate

How far the pointer has moved from the position at the start of the drag, in pixel coordinates.

Value must not be null.

startDrag

package

startDrag()

Start dragging the workspace.