Utility that provides a pull gesture with touch events.

Events:

openfl.events.Event.OPEN

Dispatched when the edge puller has completely opened.

openfl.events.Event.CLOSE

Dispatched when the edge puller has completely closed.

openfl.events.Event.CANCEL

Dispatched when an open or close action is cancelled before completing.

feathers.events.FeathersEvent.OPENING

Dispatched when the drawer starts opening. This event may be cancelled.

feathers.events.FeathersEvent.CLOSING

Dispatched when the drawer starts closing. This event may be cancelled.

openfl.events.Event.CHANGE

Dispatched when the EdgePuller.pullDistance property changes.

Available since

1.0.0

.

Static variables

@:value(-1000)staticfinalread onlyPOINTER_ID_MOUSE:Int = -1000

A special pointer ID for the mouse.

Available since

1.0.0

.

Constructor

@:value({ maxPullDistance : null, pullableEdge : LEFT })new(?target:InteractiveObject, pullableEdge:RelativePosition = LEFT, ?maxPullDistance:Float)

Creates a new EdgePuller object with the given arguments.

Available since

1.0.0

.

Variables

read onlyactive:Bool

Determines if the pull gesture is active.

Available since

1.0.0

.

activeBorderSize:Null<Float>

The size, measured in pixels, of the active border where the pull gesture may begin. If null, the full bounds of the target may start a pull gesture.

Available since

1.0.0

.

read onlydragging:Bool

Determines if a touch is currently dragging the target.

Available since

1.0.0

.

@:value(Quart.easeOut)ease:IEasing = Quart.easeOut

The easing function to use when animating the pull distance.

Available since

1.0.0

.

@:value(true)enabled:Bool = true

Determines if the target can be pulled or not.

Available since

1.0.0

.

maxPullDistance:Null<Float>

The maximum distance the edge of the target may be pulled, measured in pixels. If null, the maximum pull distance will be equal to the full size of the target.

Available since

1.0.0

.

See also:

@:value(6.0)minDragDistance:Float = 6.0

The minimum distance, measured in pixels, that the target must be dragged to begin a pull gesture.

Available since

1.0.0

.

opened:Bool

Indicates if the pull gesture is in the open position.

Available since

1.0.0

.

read onlypointerID:Int

The pointer that is currently dragging the target. Returns -1 if no pointer is currently associated with the drag.

read onlypullDistance:Float

The current distance that the edge has been pulled, from 0.0 to maxPullDistance, measured in pixels.

Available since

1.0.0

.

See also:

pullableEdge:RelativePosition

The edge of the target where the pull originates.

Available since

1.0.0

.

@:value(false)simulateTouch:Bool = false

Determines if mouse events should be treated like touch events.

Available since

1.0.0

.

snapDuration:Float

The duration of the snap animation, measured in seconds.

target:InteractiveObject

The target used for detecting pull gestures.

Available since

1.0.0

.