فهرست منبع

Make getCanvasLimit more efficient by only calling getPosition once.

samhed 11 سال پیش
والد
کامیت
16b3ef77d1
1فایلهای تغییر یافته به همراه3 افزوده شده و 2 حذف شده
  1. 3 2
      include/ui.js

+ 3 - 2
include/ui.js

@@ -255,8 +255,9 @@ var UI;
             // Hide the scrollbars until the size is calculated
             // Hide the scrollbars until the size is calculated
             container.style.overflow = "hidden";
             container.style.overflow = "hidden";
 
 
-            var w = Util.getPosition(container).width;
-            var h = Util.getPosition(container).height;
+            var pos = Util.getPosition(container);
+            var w = pos.width;
+            var h = pos.height;
 
 
             container.style.overflow = "visible";
             container.style.overflow = "visible";