passy / angular-masonry

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

setting columnWidth causes errors #177

Open pcasa opened 8 years ago

pcasa commented 8 years ago

When I try to set columnWidth via masonry-options I get several errors:

Only get these errors when I try to assign columWidth via masonry-options. What am I doing wrong? Tried to use the column-width attribute but using this, height is set to 0 on the directive wrapper causing display issues.

<masonry  reload-on-resize
         masonry-options="{containerStyle: { position: 'relative' }, 
                                      columnWidth: '33.333%', 
                                      percentPosition: true, 
                                      itemSelector: '.masonary-brick' }" >
      <div class="brick-sizer" style="width: 33.333%"></div>
      <div class="masonry-brick masonry-brick--double">This will be 200px wide max.</div>
      <div class="masonry-brick ">This will be 200px wide max.</div>
      <div class="masonry-brick ">This will be 200px wide max.</div>
      <div class="masonry-brick ">This will be 200px wide max.</div>
      <div class="masonry-brick ">This will be 200px wide max.</div>
</masonry>