Commit 16b3ef77 authored by samhed's avatar samhed

Make getCanvasLimit more efficient by only calling getPosition once.

parent cefc9a91
...@@ -255,8 +255,9 @@ var UI; ...@@ -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 pos = Util.getPosition(container);
var h = Util.getPosition(container).height; var w = pos.width;
var h = pos.height;
container.style.overflow = "visible"; container.style.overflow = "visible";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment