blockly > Flyout > isDragTowardWorkspace

Flyout.isDragTowardWorkspace() method

Determine if a drag delta is toward the workspace, based on the position and orientation of the flyout. This is used in determineDragIntention_ to determine if a new block should be created or if the flyout should scroll.

Signature:

abstract isDragTowardWorkspace(currentDragDeltaXY: Coordinate): boolean;

Parameters

Parameter Type Description
currentDragDeltaXY Coordinate How far the pointer has moved from the position at mouse down, in pixel units.

Returns:

boolean

True if the drag is toward the workspace.