Skip to content

The Face Object Field Actors on drag

Christopher Ross-Gill edited this page Aug 1, 2016 · 1 revision

on-drag is invoked when a drag object has been created and the mouse is moving inside the face in which the drag object was created.

on-drag usually comes after on-click and ceases to be used when the drag object is destroyed, which happens right after on-drop.

The drag object the input argument to the on-drag actor. No return value is necessary.

When a drag object exists, the on-move and on-over actors are not called.

Examples

Slider updates value constantly during drag and performs its face action:

on-drag: [
  do-style face 'on-offset arg/delta + arg/base
  draw-face face
  do-face face
]
Clone this wiki locally