ReferenceScripting APIDragComponentconstructor
DragComponent.constructor
constructorMakes a mote draggable with the pointer.
| Name | constructor |
|---|---|
| Kind | constructor of DragComponent |
| Called as | new DragComponent(…) |
| Since | 0.3 |
Syntax
new DragComponent( name: string, mote: Mote, options?: { axis?: "x" | "y" }): DragComponentParameters
| Name | Type | Description |
|---|---|---|
name | string | Its name on the mote. |
mote | Mote | The mote to drag. |
options | { axis?: "x" | "y" } | Optional. Axis: "x" or "y" to drag along one way alone. |
See also
Notes from the community
Written by creators and checked by the docs' editors. Not part of Motion's official reference.