client/js/renderer/scene.js
changeset 557 18c36f038e9f
parent 555 49daeea94e88
child 560 05a4380227f3
--- a/client/js/renderer/scene.js	Wed Sep 30 16:33:38 2015 +0200
+++ b/client/js/renderer/scene.js	Thu Oct 01 14:53:03 2015 +0200
@@ -290,7 +290,7 @@
             } else {
                 _ratio = ratioW;
             }
-            _this.view.resizeZoom(ratioW, ratioH, _ratio);
+            _this.view.resizeZoom(_event.delta.width, _event.delta.height, _ratio);
 
             _this.redraw();
 
@@ -1111,8 +1111,10 @@
             }
         },
         fullScreen: function() {
+            var _el = this.renkan.$[0];
+            
             if (Screenfull.isFullscreen) {
-                Screenfull.exit();
+                Screenfull.exit(_el);
             
                 var widthAft = this.$.width();
                 var heightAft = this.$.height();
@@ -1127,7 +1129,7 @@
                 paper.view.viewSize = new paper.Size([widthAft, heightAft]);
 
             } else {
-                Screenfull.request();
+                Screenfull.request(_el);
                 
                 this.redraw();
             }
@@ -1256,11 +1258,13 @@
         },
         foldBins: function() {
             var foldBinsButton = this.$.find(".Rk-Fold-Bins"),
-                bins = this.renkan.$.find(".Rk-Bins");
+                bins = this.renkan.$.find(".Rk-Bins"),
+                _delta = 0;
             var _this = this,
                 sizeBef = _this.canvas_$.width(),
                 sizeAft;
             if (bins.position().left < 0) {
+                _delta= new paper.Point([-bins.width()/2, 0]);
                 bins.animate({left: 0},250);
                 this.$.animate({left: 300},250,function() {
                     var w = _this.$.width();
@@ -1273,6 +1277,7 @@
                 }
                 foldBinsButton.html("&laquo;");
             } else {
+                _delta= new paper.Point([bins.width()/2, 0]);
                 bins.animate({left: -300},250);
                 this.$.animate({left: 0},250,function() {
                     var w = _this.$.width();
@@ -1281,6 +1286,7 @@
                 sizeAft = sizeBef+300;
                 foldBinsButton.html("&raquo;");
             }
+            this.view.paperShift(_delta);
         },
         save: function() { },
         open: function() { }