passy / angular-masonry

An AngularJS directive for Masonry.
https://passy.github.io/angular-masonry
MIT License
1.12k stars 216 forks source link

feat(directive): add `reload-on-resize` option #125

Closed tomersimis-zz closed 9 years ago

tomersimis-zz commented 9 years ago

Add a $watch to detect when masonry is resized and call ctrl.reload().

Triggers a reload when the masonry element changes its width, useful when only the parent element is resized (and not the window) and you want the elements to be rearranged. Without this if the parent is resized then some blank space may be left on the sides.

passy commented 9 years ago

That looks great, thanks for the PR. Do you think you could make the test a bit more specific?

tomersimis-zz commented 9 years ago

@passy I think this makes the tests more specific (bf280d0095cf15d327936fdcd7903780ab40f32c), what do you think?

passy commented 9 years ago

Much better! Thanks a lot, Tomer!