rnmp/salvattore

Re-initialize

Opened this issue · 8 comments

How can the layout be reinitlized??

I have a bunch of images and at the moment the columns are distributed evenly, so when the images load, long, portraits cause 1 or so columns to be super long while the rest are small.

image

So I want to redistribute the columns once the images are loaded.

Unless there's a better way to do this...

Have you tried initializing salvattore on load rather on ready?

What will that do? Columns are distributed evenly by # of items, even with fixed height/width of the images it still renders the same. The API has no easy way of being invoked manually.

I have the same question, how do I re-init the salvattore?
The pages in BE of my CMS TYPO3 Neos are loaded via AJAX calls, so I need that.

Same issue here I want to reinitialize it inside an angular template but I can't see how!

Too bad still no way to re-initialize. Need to load news via AJAX.

Nice, this seems to work: salvattore.rescanMediaQueries();

Oh cool! That works great! Thank you @dimaip

This works for me:

var grid = document.getElementById('grid');

salvattore.recreateColumns(grid);