From 9bfdc1fff649fa4a086e7dc291af21b431a5b95c Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Fri, 17 Feb 2012 15:54:34 -0800 Subject: Re-adding stage mouse wheel scrolling Signed-off-by: Valerio Virgillito --- js/stage/stage.reel/stage.html | 2 +- js/stage/stage.reel/stage.js | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'js') 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 @@
-
asdasd asd asd asd asd asd
+
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, { this._drawingCanvas.addEventListener("mousedown", this, false); this._drawingCanvas.addEventListener("mouseup", this, false); this._drawingCanvas.addEventListener("dblclick", this, false); + this._drawingCanvas.addEventListener("mousewheel", this, false); // Hide the canvas this.hideCanvas(true); @@ -360,6 +361,16 @@ exports.Stage = Montage.create(Component, { } }, + handleMousewheel: { + value: function(event) { + if(event._event.wheelDelta > 0) { + this._iframeContainer.scrollTop -= 20; + } else { + this._iframeContainer.scrollTop += 20; + } + } + }, + /** * Enables the MouseMove on Canvas */ -- cgit v1.2.3