Gallery issue with columns and small content area's
-
Hi there,
I’m using this plugin for a gallery in a project and I like it. I noticed some weird behaviour setting the columns attribute and a small content area. So I took a dive into the source code and found the calculateGrid function in gallery.js. Here’s a small section of it:
if ( columns > 1 ) { if ( containerWidth < 568 ) { columns -= 2; if ( columns > 4 ) { columns = 4; } } /* else if ( containerWidth < 768 ) { columns -= 1; } */ if ( columns < 2 ) { columns = 2; } }
I think it has something to do with the responsiveness of the gallery. The theme I’m using has a content width (=containerWidth) smaller than 568 and I want a gallery with 3 columns. This would be impossible with the code above as it turns it into a 2 column gallery. Is it possible to pick any number of columns and the gallery uses that number of columns, without changing the plugins code?
- The topic ‘Gallery issue with columns and small content area's’ is closed to new replies.