salvattore icon indicating copy to clipboard operation
salvattore copied to clipboard

Re-initialize

Open phillip-haydon opened this issue 10 years ago • 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...

phillip-haydon avatar Dec 07 '14 19:12 phillip-haydon

Have you tried initializing salvattore on load rather on ready?

haswalt avatar Dec 17 '14 16:12 haswalt

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.

phillip-haydon avatar Dec 17 '14 16:12 phillip-haydon

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.

dimaip avatar Jan 26 '15 16:01 dimaip

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

yahyazini avatar Feb 24 '15 21:02 yahyazini

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

dimaip avatar Apr 28 '15 13:04 dimaip

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

dimaip avatar Apr 28 '15 14:04 dimaip

Oh cool! That works great! Thank you @dimaip

yahyazini avatar Apr 28 '15 14:04 yahyazini

This works for me:

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

salvattore.recreateColumns(grid);

robincarlo84 avatar May 11 '15 17:05 robincarlo84