From e5579374ff39b80b8c0c69faba37f6f581758fe0 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Tue, 7 Feb 2012 13:28:17 -0800 Subject: updated montage v.0.6 to the latest changes. Signed-off-by: Valerio Virgillito --- node_modules/montage/ui/composer/composer.js | 14 +++++++++++++ node_modules/montage/ui/composer/swipe-composer.js | 24 ++++++++++++---------- 2 files changed, 27 insertions(+), 11 deletions(-) (limited to 'node_modules/montage/ui/composer') 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 } }, + + /** + * This property controls when a composer's load method is called. If `false` + * the composer's load method is called immediately as part of the next draw + * cycle after addComposer has been called on its associated component. If + * `true` loading of the composer is delayed until its associated component + * has prepareForActivationEvents called. + * @property + * @default false + */ + lazyLoad: { + value: false + }, + _needsFrame: { value: false }, 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 } } - swipeEvent = document.createEvent("CustomEvent"); - swipeEvent.initCustomEvent("swipemove", true, false, null); - swipeEvent.direction = direction; - swipeEvent.angle = this._startSwipeAngle; - swipeEvent.velocity = this._findVelocity((event.timeStamp - this._startTimestamp)); - swipeEvent.startX = this._startX; - swipeEvent.startY = this._startY; - swipeEvent.dX = this._deltaX; - swipeEvent.dY = this._deltaY; - - this.dispatchEvent(swipeEvent); + if (dX != 0 || dY != 0) { + swipeEvent = document.createEvent("CustomEvent"); + swipeEvent.initCustomEvent("swipemove", true, false, null); + swipeEvent.direction = direction; + swipeEvent.angle = this._startSwipeAngle; + swipeEvent.velocity = this._findVelocity((event.timeStamp - this._startTimestamp)); + swipeEvent.startX = this._startX; + swipeEvent.startY = this._startY; + swipeEvent.dX = this._deltaX; + swipeEvent.dY = this._deltaY; + + this.dispatchEvent(swipeEvent); + } } }, -- cgit v1.2.3