Skip to content

Commit 4a91b1e

Browse files
committed
Added dragStartXGlobal and dragStartYGlobal properties
1 parent 5fa4264 commit 4a91b1e

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

src/input/CreateInteractiveObject.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ var CreateInteractiveObject = function (gameObject, hitArea, hitAreaCallback)
5151

5252
dragStartX: 0,
5353
dragStartY: 0,
54+
dragStartXGlobal: 0,
55+
dragStartYGlobal: 0,
5456

5557
dragX: 0,
5658
dragY: 0

src/input/typedefs/InteractiveObject.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@
1515
* @property {number} localX - The x coordinate that the Pointer interacted with this object on, relative to the Game Object's top-left position.
1616
* @property {number} localY - The y coordinate that the Pointer interacted with this object on, relative to the Game Object's top-left position.
1717
* @property {(0|1|2)} dragState - The current drag state of this Interactive Object. 0 = Not being dragged, 1 = being checked for drag, or 2 = being actively dragged.
18-
* @property {number} dragStartX - The x coordinate that the Pointer started dragging this Interactive Object from.
19-
* @property {number} dragStartY - The y coordinate that the Pointer started dragging this Interactive Object from.
18+
* @property {number} dragStartX - The x coordinate of the Game Object that owns this Interactive Object when the drag started.
19+
* @property {number} dragStartY - The y coordinate of the Game Object that owns this Interactive Object when the drag started.
20+
* @property {number} dragStartXGlobal - The x coordinate that the Pointer started dragging this Interactive Object from.
21+
* @property {number} dragStartYGlobal - The y coordinate that the Pointer started dragging this Interactive Object from.
2022
* @property {number} dragX - The x coordinate that this Interactive Object is currently being dragged to.
2123
* @property {number} dragY - The y coordinate that this Interactive Object is currently being dragged to.
2224
*/

0 commit comments

Comments
 (0)