aboutsummaryrefslogtreecommitdiff
path: root/js/stage
diff options
context:
space:
mode:
authorValerio Virgillito2012-02-17 15:54:34 -0800
committerValerio Virgillito2012-02-17 15:54:34 -0800
commit9bfdc1fff649fa4a086e7dc291af21b431a5b95c (patch)
treec63e27d86743d063efc83b1314ba85f761227363 /js/stage
parent18a42c37d080c03830c3f0a4156b81044e6309ee (diff)
downloadninja-9bfdc1fff649fa4a086e7dc291af21b431a5b95c.tar.gz
Re-adding stage mouse wheel scrolling
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/stage')
-rwxr-xr-xjs/stage/stage.reel/stage.html2
-rwxr-xr-xjs/stage/stage.reel/stage.js11
2 files changed, 12 insertions, 1 deletions
diff --git a/js/stage/stage.reel/stage.html b/js/stage/stage.reel/stage.html
index 9ed0f636..812e3d55 100755
--- a/js/stage/stage.reel/stage.html
+++ b/js/stage/stage.reel/stage.html
@@ -82,7 +82,7 @@
82 <section id="stageAndScenesContainer" class="stageAndScenesContainer"> 82 <section id="stageAndScenesContainer" class="stageAndScenesContainer">
83 <section id="stageView"></section> 83 <section id="stageView"></section>
84 <section id="iframeContainer"></section> 84 <section id="iframeContainer"></section>
85 <section id="textToolObject">asdasd asd asd asd asd asd </section> 85 <section id="textToolObject"></section>
86 <canvas id="layoutCanvas"></canvas> 86 <canvas id="layoutCanvas"></canvas>
87 <canvas id="stageCanvas"></canvas> 87 <canvas id="stageCanvas"></canvas>
88 <canvas id="drawingCanvas"></canvas> 88 <canvas id="drawingCanvas"></canvas>
diff --git a/js/stage/stage.reel/stage.js b/js/stage/stage.reel/stage.js
index 59eb9317..37b1df35 100755
--- a/js/stage/stage.reel/stage.js
+++ b/js/stage/stage.reel/stage.js
@@ -201,6 +201,7 @@ exports.Stage = Montage.create(Component, {
201 this._drawingCanvas.addEventListener("mousedown", this, false); 201 this._drawingCanvas.addEventListener("mousedown", this, false);
202 this._drawingCanvas.addEventListener("mouseup", this, false); 202 this._drawingCanvas.addEventListener("mouseup", this, false);
203 this._drawingCanvas.addEventListener("dblclick", this, false); 203 this._drawingCanvas.addEventListener("dblclick", this, false);
204 this._drawingCanvas.addEventListener("mousewheel", this, false);
204 205
205 // Hide the canvas 206 // Hide the canvas
206 this.hideCanvas(true); 207 this.hideCanvas(true);
@@ -360,6 +361,16 @@ exports.Stage = Montage.create(Component, {
360 } 361 }
361 }, 362 },
362 363
364 handleMousewheel: {
365 value: function(event) {
366 if(event._event.wheelDelta > 0) {
367 this._iframeContainer.scrollTop -= 20;
368 } else {
369 this._iframeContainer.scrollTop += 20;
370 }
371 }
372 },
373
363 /** 374 /**
364 * Enables the MouseMove on Canvas 375 * Enables the MouseMove on Canvas
365 */ 376 */