Closed KeshaFinkel closed 9 years ago
Some block collapsing to width 0 when i resize window maybe i did something wrong?
wall.reset({ draggable: false, cache: false, selector: '.cell', animate: false, cellW: function(){ var boxWitdth = 160; if($(window).width() < 330) { var cells = $('#freewall').find('.cell'); $.each(cells,function(i,val) { $(val).attr('data-width',160); }); } else if($(window).width() < 755){ boxWitdth = Math.floor(document.getElementById('freewall').offsetWidth/2); }else if($(window).width() < 1011){ boxWitdth = Math.floor(document.getElementById('freewall').offsetWidth/3); }else if($(window).width() < 1267){ boxWitdth = Math.floor(document.getElementById('freewall').offsetWidth/4); } else { boxWitdth = Math.floor(document.getElementById('freewall').offsetWidth/5); } console.log("Box width:" + boxWitdth); return boxWitdth; }, cellH: function(){ var boxHeight = 160; if($(window).width() < 330) { var cells = $('#freewall').find('.cell'); $.each(cells,function(i,val) { $(val).attr('data-height',160); }); } else if($(window).width() < 768){ boxHeight = Math.floor(document.getElementById('freewall').offsetWidth/2); }else if($(window).width() < 1024){ boxHeight = Math.floor(document.getElementById('freewall').offsetWidth/3); }else if($(window).width() < 1280){ boxHeight = Math.floor(document.getElementById('freewall').offsetWidth/4); } else { boxHeight = Math.floor(document.getElementById('freewall').offsetWidth/5); } console.log("Box width:" + boxHeight); return boxHeight; }, gutterX: 0, gutterY: 0, onResize: function() { wall.fitWidth(); wall.refresh(); } });
u can see it here: http://badlab.ru/
Hi, Could you please set cacheSize: false intead of cache: false.
Omg that option totally ruined grid layout
my failure, got some elements positioned manually
Some block collapsing to width 0 when i resize window maybe i did something wrong?
u can see it here: http://badlab.ru/