Roo/bootstrap/UploadCropbox.js
authoredward <edward@roojs.com>
Tue, 19 Jan 2016 08:17:49 +0000 (16:17 +0800)
committeredward <edward@roojs.com>
Tue, 19 Jan 2016 08:17:49 +0000 (16:17 +0800)
Roo/bootstrap/UploadCropbox.js

index 892df49..c57223e 100644 (file)
@@ -286,24 +286,24 @@ Roo.extend(Roo.bootstrap.UploadCropbox, Roo.bootstrap.Component,  {
         
         this.dragable = false;
     },
-//    
-//    onMouseWheel : function(e)
-//    {   
-//        e.stopEvent();
-//        
-//        var ratio = (e.getWheelDelta() == 1) ? (this.ratio * 1.1) : (this.ratio * 0.9);
-//        
-//        if(
-//                parseInt(this.image.dom.width) * ratio < this.thumb.getWidth() ||
-//                parseInt(this.image.dom.height) * ratio < this.thumb.getHeight()
-//        ){
-//            return;
-//        }
-//        
-//        this.ratio = (e.getWheelDelta() == 1) ? (this.ratio * 1.1) : (this.ratio * 0.9);
-//        
-//        this.setBackground();
-//    },
+    
+    onMouseWheel : function(e)
+    {   
+        e.stopEvent();
+        
+        var ratio = (e.getWheelDelta() == 1) ? (this.ratio * 1.1) : (this.ratio * 0.9);
+        
+        if(
+                parseInt(this.image.dom.width) * ratio < this.thumb.getWidth() ||
+                parseInt(this.image.dom.height) * ratio < this.thumb.getHeight()
+        ){
+            return;
+        }
+        
+        this.ratio = (e.getWheelDelta() == 1) ? (this.ratio * 1.1) : (this.ratio * 0.9);
+        
+        this.setBackground();
+    },
 //    
 //    onRotateLeft : function(e)
 //    {