API Reference

Class List

pc.ElementDragHelper

Helper class that makes it easy to create Elements that can be dragged by the mouse or touch.

Summary

Events

drag:endFired when the current new drag operation ends.
drag:moveFired whenever the position of the dragged element changes.
drag:startFired when a new drag operation starts.

Details

Constructor

ElementDragHelper(element, [axis])

Create a new ElementDragHelper

Parameters

elementpc.ElementComponentThe Element that should become draggable.
axisStringOptional axis to constrain to, either 'x', 'y' or null.

Events

drag:end

Fired when the current new drag operation ends.

drag:move

Fired whenever the position of the dragged element changes.

Parameters

valuepc.Vec3The current position.

drag:start

Fired when a new drag operation starts.