Skip to content
This repository has been archived by the owner on Jul 15, 2022. It is now read-only.

Adding columnsChange dispatch after init #200

Open
efc opened this issue Mar 10, 2017 · 1 comment
Open

Adding columnsChange dispatch after init #200

efc opened this issue Mar 10, 2017 · 1 comment

Comments

@efc
Copy link

efc commented Mar 10, 2017

I would like to synchronize the height of my parent container (the div with the data-columns attribute attached) so that it matches the hight of the tallest masonry-column. I could do this with JavaScript if I were alerted each time Salvattore finished adding or removing items from its columns. Is there any kind of "salvattore-done" message I can listen for (a jQuery(document.body).on('salvattore-done', ...) kind of thing) so that my script to take over with the cleanup?

If not, I would suggest an enhancement to send a message of this sort.

In this case, do you have any suggestions how I could monitor Salvattore to know when to step in, or alternatively, any other suggestions for keeping the parent container height in sync?

@efc
Copy link
Author

efc commented Mar 10, 2017

On closer inspection, I believe my request may boil down to dispatching a columnsChange at the end of the init. This is already done at the end of a recreateColumns, but my argument would be that creating the columns in the first place is also a change to the columns.

Once this dispatch was in place, I could catch it to update my container height. Any later appending or removing from the container is something I am controlling, so I can manage the container height fix without a dispatch on those. The media-related resizing already dispatches the event.

@efc efc changed the title Synchronizing height of parent container Adding columnsChange dispatch after init Mar 10, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant