shershen08 / vue-masonry

💠 Vue.js directive for masonry blocks layouting ✅
MIT License
674 stars 81 forks source link

Responsive layout not working #79

Closed Peretz30 closed 5 years ago

Peretz30 commented 5 years ago

I am trying to implement something like this: image With this:

columnWidth: 20%
percentPosition: true

And something wrong happening. Please, check https://jsfiddle.net/6g5bx97m/3/

shershen08 commented 5 years ago

Your setup is not fully correct: in your <div v-masonry percent-position column-width=".grid-sizer" transition-duration="0.3s" item-selector=".item" you didn't set the selector for the actual masonry single block - your item-selector=".item" while there's no .item elements. You should have it smth like this:

<div v-masonry item-selector=".single-item" 
...
<div v-masonry-tile class="single-item" 
...
</div>
</div>
shershen08 commented 5 years ago

Take a look at the demo https://shershen08.github.io/vue-plugins-demo-static/index.html#/masonry hope that helps