Above code with an empty HTML layout with no CSS applied to container causes infinite loop and instant crash, resulting in Out of memory errors in both Firefox and Chrome.
Simply adding a call to: wall.fitWidth() prior to calling wall.appendBlock(data) appears to resolve the problem.
That being said: it would make more sense to add a call to fitWidth in appendBlock if the wall has not be initialised.
var wall = new freewall('#free-wall'); wall.reset({ selector: '.brick', animate: true, cellW: 150, cellH: 150, delay: 50, onResize: function() { wall.fitWidth(); } }); wall.appendBlock('<div class="brick">test</div>');
Above code with an empty HTML layout with no CSS applied to container causes infinite loop and instant crash, resulting in Out of memory errors in both Firefox and Chrome.
Simply adding a call to: wall.fitWidth() prior to calling wall.appendBlock(data) appears to resolve the problem.
That being said: it would make more sense to add a call to fitWidth in appendBlock if the wall has not be initialised.