aboutsummaryrefslogtreecommitdiff
path: root/node_modules/montage/ui/composer/swipe-composer.js
diff options
context:
space:
mode:
authorArmen Kesablyan2012-02-13 11:59:19 -0800
committerArmen Kesablyan2012-02-13 11:59:19 -0800
commit90d0c8c0e98d062c628c061fe5765ce991fda409 (patch)
tree9780e9dcf475bf319f3cacc1a1ad52fcf9f133af /node_modules/montage/ui/composer/swipe-composer.js
parent8110e01dc5093ac6baf621103dcaa5f769e5be92 (diff)
parente142611e22718b1f1d1696902ad9161ec5f33f98 (diff)
downloadninja-90d0c8c0e98d062c628c061fe5765ce991fda409.tar.gz
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal
Conflicts: css/ninja.css js/stage/stage.reel/stage.html js/tools/TextTool.js node_modules/labs/rich-text-editor.reel/rich-text-editor.css node_modules/labs/rich-text-editor.reel/rich-text-editor.html node_modules/labs/rich-text-editor.reel/rich-text-editor.js node_modules/labs/rich-text-editor.reel/rich-text-resizer.js node_modules/labs/rich-text-editor.reel/rich-text-sanitizer.js Signed-off-by: Armen Kesablyan <armen@motorola.com>
Diffstat (limited to 'node_modules/montage/ui/composer/swipe-composer.js')
-rw-r--r--node_modules/montage/ui/composer/swipe-composer.js24
1 files changed, 13 insertions, 11 deletions
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