Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
Add clientX/Y for hold event
Browse files Browse the repository at this point in the history
Fixes #23
  • Loading branch information
dfreedm committed Feb 24, 2014
1 parent 5ffff58 commit 5dc704b
Showing 1 changed file with 20 additions and 8 deletions.
28 changes: 20 additions & 8 deletions src/hold.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,19 @@
* @class hold
*/
/**
* Milliseconds pointer has been held down.
* Type of pointer that made the holding event.
* @type String
* @property pointerType
*/
/**
* Screen X axis position of the held pointer
* @type Number
* @property holdTime
* @property clientX
*/
/**
* Screen Y axis position of the held pointer
* @type Number
* @property clientY
*/
/**
* Type of pointer that made the holding event.
Expand All @@ -27,16 +37,16 @@
* @class holdpulse
* @extends hold
*/
/**
* Milliseconds pointer has been held down.
* @type Number
* @property holdTime
*/
/**
* This event is fired when a held pointer is released or moved.
*
* @class released
*/
/**
* Type of pointer that made the holding event.
* @type String
* @property pointerType
*/

(function(scope) {
var dispatcher = scope.dispatcher;
Expand Down Expand Up @@ -95,7 +105,9 @@
},
fireHold: function(inType, inHoldTime) {
var p = {
pointerType: this.heldPointer.pointerType
pointerType: this.heldPointer.pointerType,
clientX: this.heldPointer.clientX,
clientY: this.heldPointer.clientY
};
if (inHoldTime) {
p.holdTime = inHoldTime;
Expand Down

0 comments on commit 5dc704b

Please sign in to comment.