From accb853a858f13a08573103a1efd5ae88c155457 Mon Sep 17 00:00:00 2001 From: MatMoul Date: Sat, 11 Nov 2017 15:30:03 +0100 Subject: [PATCH] Bug: Tile instable when resizing to speed --- src/js/dial.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/js/dial.js b/src/js/dial.js index 6d20daf..c49e7cc 100644 --- a/src/js/dial.js +++ b/src/js/dial.js @@ -381,9 +381,12 @@ dial.initGrid = function(){ return dial.Grid; }; dial.updateGridLayout = function(){ + var parentWidth = dial.Grid.parentElement.offsetWidth; + var parentHeight = dial.Grid.parentElement.offsetHeight; + function calc(gridMargin, cellsMargin, borderSize, titleBorderSize){ - var fullWidth = dial.Grid.parentElement.offsetWidth - 2 * gridMargin; - var fullHeight = dial.Grid.parentElement.offsetHeight - 2 * gridMargin; + var fullWidth = parentWidth - 2 * gridMargin; + var fullHeight = parentHeight - 2 * gridMargin; var cellWidth = fullWidth / app.settings.grid.columns; var cellHeight = fullHeight / app.settings.grid.rows; var linkWidth = 0;