aboutsummaryrefslogtreecommitdiff
path: root/node_modules/montage/ui/composer
diff options
context:
space:
mode:
authorhwc4872012-02-08 14:47:31 -0800
committerhwc4872012-02-08 14:47:31 -0800
commit468d324f8e9a5f018bc7609b58254ae468075ce9 (patch)
treec55cebc2cefc959251bcaca0fce139b4b1fc0fc7 /node_modules/montage/ui/composer
parentab4b753907bc80a969b0d4104d0b0731597e3bf0 (diff)
parent0537f8f29e7b8dd48fd08f20b1533fbe92a54c4b (diff)
downloadninja-468d324f8e9a5f018bc7609b58254ae468075ce9.tar.gz
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal into working
Diffstat (limited to 'node_modules/montage/ui/composer')
-rw-r--r--node_modules/montage/ui/composer/composer.js14
-rw-r--r--node_modules/montage/ui/composer/swipe-composer.js24
2 files changed, 27 insertions, 11 deletions
diff --git a/node_modules/montage/ui/composer/composer.js b/node_modules/montage/ui/composer/composer.js
index 2f91bb22..eee7be67 100644
--- a/node_modules/montage/ui/composer/composer.js
+++ b/node_modules/montage/ui/composer/composer.js
@@ -40,6 +40,20 @@ exports.Composer = Montage.create(Montage, /** @lends module:montage/ui/composer
40 } 40 }
41 }, 41 },
42 42
43
44 /**
45 * This property controls when a composer's load method is called. If `false`
46 * the composer's load method is called immediately as part of the next draw
47 * cycle after addComposer has been called on its associated component. If
48 * `true` loading of the composer is delayed until its associated component
49 * has prepareForActivationEvents called.
50 * @property
51 * @default false
52 */
53 lazyLoad: {
54 value: false
55 },
56
43 _needsFrame: { 57 _needsFrame: {
44 value: false 58 value: false
45 }, 59 },
diff --git a/node_modules/montage/ui/composer/swipe-composer.js b/node_modules/montage/ui/composer/swipe-composer.js
index 4eb9ee3b..2d9fe266 100644
--- a/node_modules/montage/ui/composer/swipe-composer.js
+++ b/node_modules/montage/ui/composer/swipe-composer.js
@@ -208,17 +208,19 @@ exports.SwipeComposer = Montage.create(Composer, /** @lends module:montage/ui/co
208 } 208 }
209 } 209 }
210 210
211 swipeEvent = document.createEvent("CustomEvent"); 211 if (dX != 0 || dY != 0) {
212 swipeEvent.initCustomEvent("swipemove", true, false, null); 212 swipeEvent = document.createEvent("CustomEvent");
213 swipeEvent.direction = direction; 213 swipeEvent.initCustomEvent("swipemove", true, false, null);
214 swipeEvent.angle = this._startSwipeAngle; 214 swipeEvent.direction = direction;
215 swipeEvent.velocity = this._findVelocity((event.timeStamp - this._startTimestamp)); 215 swipeEvent.angle = this._startSwipeAngle;
216 swipeEvent.startX = this._startX; 216 swipeEvent.velocity = this._findVelocity((event.timeStamp - this._startTimestamp));
217 swipeEvent.startY = this._startY; 217 swipeEvent.startX = this._startX;
218 swipeEvent.dX = this._deltaX; 218 swipeEvent.startY = this._startY;
219 swipeEvent.dY = this._deltaY; 219 swipeEvent.dX = this._deltaX;
220 220 swipeEvent.dY = this._deltaY;
221 this.dispatchEvent(swipeEvent); 221
222 this.dispatchEvent(swipeEvent);
223 }
222 } 224 }
223 }, 225 },
224 226