shershen08 / vue-masonry

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

How to get the current number of columns? #125

Closed nodermann2 closed 2 years ago

shershen08 commented 2 years ago

There's no direct model value that stores the number of columns but you could maybe use some JS to calculate it by dividing the width of the container by width of the target element column-width="#test"

keep in mind there's a property that if is set - resizes the container fit-width="true" - sets the width of the container to fit the available number of columns;