diff options
author | Jonathan Duran | 2012-05-09 09:58:27 -0700 |
---|---|---|
committer | Jonathan Duran | 2012-05-09 09:58:27 -0700 |
commit | 48a2a800155fd2d608fb7191c0180cd8f625cd44 (patch) | |
tree | 899f9cf1b09a01bc073f92ab498236aed80b38ec /node_modules/montage/ui/composer/press-composer.js | |
parent | 2ea8a62835f4c20efff2623306e7205e6f5bf0ba (diff) | |
parent | d220c02e246b30509b28a47fa04916ca2b8122e4 (diff) | |
download | ninja-48a2a800155fd2d608fb7191c0180cd8f625cd44.tar.gz |
Merge branch 'refs/heads/NINJAmaster' into TimelineUber
Conflicts:
js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html
Signed-off-by: Jonathan Duran <jduran@motorola.com>
Diffstat (limited to 'node_modules/montage/ui/composer/press-composer.js')
-rw-r--r-- | node_modules/montage/ui/composer/press-composer.js | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/node_modules/montage/ui/composer/press-composer.js b/node_modules/montage/ui/composer/press-composer.js index 680c301d..d71d2ec6 100644 --- a/node_modules/montage/ui/composer/press-composer.js +++ b/node_modules/montage/ui/composer/press-composer.js | |||
@@ -40,7 +40,7 @@ var PressComposer = exports.PressComposer = Montage.create(Composer,/** @lends m | |||
40 | @name longPress | 40 | @name longPress |
41 | @param {Event} event | 41 | @param {Event} event |
42 | 42 | ||
43 | Dispatched when a press lasts for longer than (@link longPressTimeout} | 43 | Dispatched when a press lasts for longer than (@link longPressThreshold} |
44 | */ | 44 | */ |
45 | 45 | ||
46 | /** | 46 | /** |
@@ -129,25 +129,25 @@ var PressComposer = exports.PressComposer = Montage.create(Composer,/** @lends m | |||
129 | value: false | 129 | value: false |
130 | }, | 130 | }, |
131 | 131 | ||
132 | _longPressTimeout: { | 132 | _longPressThreshold: { |
133 | enumerable: false, | 133 | enumerable: false, |
134 | value: 1000 | 134 | value: 1000 |
135 | }, | 135 | }, |
136 | /** | 136 | /** |
137 | How long a press has to last for a longPress event to be dispatched | 137 | How long a press has to last for a longPress event to be dispatched |
138 | */ | 138 | */ |
139 | longPressTimeout: { | 139 | longPressThreshold: { |
140 | get: function() { | 140 | get: function() { |
141 | return this._longPressTimeout; | 141 | return this._longPressThreshold; |
142 | }, | 142 | }, |
143 | set: function(value) { | 143 | set: function(value) { |
144 | if (this._longPressTimeout !== value) { | 144 | if (this._longPressThreshold !== value) { |
145 | this._longPressTimeout = value; | 145 | this._longPressThreshold = value; |
146 | } | 146 | } |
147 | } | 147 | } |
148 | }, | 148 | }, |
149 | 149 | ||
150 | _longPressTimer: { | 150 | _longPressTimeout: { |
151 | enumberable: false, | 151 | enumberable: false, |
152 | value: null | 152 | value: null |
153 | }, | 153 | }, |
@@ -407,9 +407,9 @@ var PressComposer = exports.PressComposer = Montage.create(Composer,/** @lends m | |||
407 | 407 | ||
408 | if (this._shouldDispatchLongPress) { | 408 | if (this._shouldDispatchLongPress) { |
409 | var self = this; | 409 | var self = this; |
410 | this._longPressTimer = setTimeout(function () { | 410 | this._longPressTimeout = setTimeout(function () { |
411 | self._dispatchLongPress(); | 411 | self._dispatchLongPress(); |
412 | }, this._longPressTimeout); | 412 | }, this._longPressThreshold); |
413 | } | 413 | } |
414 | } | 414 | } |
415 | }, | 415 | }, |
@@ -422,8 +422,8 @@ var PressComposer = exports.PressComposer = Montage.create(Composer,/** @lends m | |||
422 | enumerable: false, | 422 | enumerable: false, |
423 | value: function (event) { | 423 | value: function (event) { |
424 | if (this._shouldDispatchLongPress) { | 424 | if (this._shouldDispatchLongPress) { |
425 | clearTimeout(this._longPressTimer); | 425 | clearTimeout(this._longPressTimeout); |
426 | this._longPressTimer = null; | 426 | this._longPressTimeout = null; |
427 | } | 427 | } |
428 | 428 | ||
429 | this.dispatchEvent(this._createPressEvent("press", event)); | 429 | this.dispatchEvent(this._createPressEvent("press", event)); |
@@ -440,7 +440,7 @@ var PressComposer = exports.PressComposer = Montage.create(Composer,/** @lends m | |||
440 | value: function (event) { | 440 | value: function (event) { |
441 | if (this._shouldDispatchLongPress) { | 441 | if (this._shouldDispatchLongPress) { |
442 | this.dispatchEvent(this._createPressEvent("longPress", event)); | 442 | this.dispatchEvent(this._createPressEvent("longPress", event)); |
443 | this._longPressTimer = null; | 443 | this._longPressTimeout = null; |
444 | } | 444 | } |
445 | } | 445 | } |
446 | }, | 446 | }, |
@@ -453,8 +453,8 @@ var PressComposer = exports.PressComposer = Montage.create(Composer,/** @lends m | |||
453 | enumerable: false, | 453 | enumerable: false, |
454 | value: function (event) { | 454 | value: function (event) { |
455 | if (this._shouldDispatchLongPress) { | 455 | if (this._shouldDispatchLongPress) { |
456 | clearTimeout(this._longPressTimer); | 456 | clearTimeout(this._longPressTimeout); |
457 | this._longPressTimer = null; | 457 | this._longPressTimeout = null; |
458 | } | 458 | } |
459 | 459 | ||
460 | this._state = PressComposer.CANCELLED; | 460 | this._state = PressComposer.CANCELLED; |