From 63ade52482e50e374d912b14f626ed436a29410f Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Wed, 12 Jul 2017 12:24:21 +0200 Subject: [PATCH] Fix defaut board real size to center properly --- client/css/framemo.css | 4 ++++ client/script.js | 24 +++++++++++++++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/client/css/framemo.css b/client/css/framemo.css index 222cc58..9c56a80 100644 --- a/client/css/framemo.css +++ b/client/css/framemo.css @@ -45,3 +45,7 @@ h1 a.banner { #add-col[style], #delete-col[style] { display:inline !important; // No mouvehover effect on mobile } + +.board-outline { + margin: auto; +} diff --git a/client/script.js b/client/script.js index 58be44f..53789a4 100644 --- a/client/script.js +++ b/client/script.js @@ -1050,7 +1050,30 @@ $(document).ready(function(){ }, 500); /** Layout Framemo - Tabs **/ + + // Defaut board real size (not 'auto' or 'inherit') saved in database + // in order to be able to center it + var boardReady = setInterval(function() { + + if(boardInitialized) { // when board is ready + if($('.board-outline').attr('style') === undefined) { // check if size is imported from db + $('.board-outline').css({ + 'width':$('.board-outline.ui-resizable').width()+16+'px', + 'height':'466px' + }) + var data= {}; + data.size = { + height: 466, + width: $('.board-outline.ui-resizable').width()+16 + } + boardResizeHappened("resizestop", data) // using scrumblr function that keep size in db after a resize + } + clearInterval(boardReady); + } + }, 500); + + // Tabs $('.board-outline') .before( '