Draggable
class Draggable extends Renderable
A Draggable base object
Constructor
new Draggable(x: number, y: number, width: number, height: number) → {}
Name | Type | Description |
---|---|---|
x | number |
the x coordinates of the draggable object |
y | number |
the y coordinates of the draggable object |
width | number |
draggable object width |
height | number |
draggable object height |
Summary
Methods from Draggable
boolean |
|
|
|
boolean |
|
Properties inherited from Renderable
number |
|
boolean |
|
Container | Entity |
|
ObservableVector2d |
|
boolean |
|
string |
|
Body |
|
Matrix2d |
|
number |
|
boolean |
|
string |
|
boolean |
|
boolean |
|
boolean |
|
boolean |
|
boolean |
|
boolean |
|
boolean |
|
Rect | RoundRect | Polygon | Line | Ellipse |
|
string |
|
Function |
|
Application |
|
ObservableVector3d |
|
GLShader |
|
Color |
|
boolean |
|
Properties inherited from Rect
Methods inherited from Renderable
Methods inherited from Rect
Rect |
|
Rect |
|
boolean |
|
Rect |
|
boolean |
|
boolean |
|
boolean |
|
Rect |
|
Rect |
|
Polygon |
|
Rect |
|
Methods inherited from Polygon
Array<number> |
|
boolean |
|
Polygon |
|
Polygon |
|
|
|
Polygon |
|
Polygon |
|
Polygon |
|
Public Methods
dragEnd() → {boolean}
Gets called when the user stops dragging the entity
Type | Description |
---|---|
boolean |
false if the object stopped being dragged |
dragMove(e: object) → {}
Gets called when the user drags this entity around
Name | Type | Description |
---|---|---|
e | object |
the pointer event |
dragStart(e: object) → {boolean}
Gets called when the user starts dragging the entity
Name | Type | Description |
---|---|---|
e | object |
the pointer event |
Type | Description |
---|---|
boolean |
false if the object is being dragged |