DragAndClickManipulator Class

Description

Manipulator that executes an onStartDragging callback when the mouse is dragged, and an onClick callback when the mouse is only clicked.

public class DragAndClickManipulator : MouseManipulator, IManipulator
Inheritance
DragAndClickManipulator
Remarks

This is useful for draggable foldouts and toggles, like the headers of Components in the inspector, that only process the click on MouseUp when the mouse is not dragged.

Constructors

DragAndClickManipulator()
DragAndClickManipulator(Action, Action)

Properties

dragDistanceThreshold

The distance the mouse has to move before onStartDragging is called.

onClick

Delegate called when mouse is released and it hasn't been dragged.

onStartDragging

Delegate called when mouse begins dragged. It usually should start a drag operation using the DragAndDrop API.