Justified-Gallery icon indicating copy to clipboard operation
Justified-Gallery copied to clipboard

Set max row number and hide remaining

Open bboy-space opened this issue 8 years ago • 6 comments

Great plugin, works pretty well ! Just one suggestion, that would be awesome to set a maximum row number. Not a maximum row height, but I would like for example to set 2 rows in my gallery, and the remaining rows will be hidden.

Do you have that feature in mind, or is it easy to dive in the code for me ? Thanks

bboy-space avatar Nov 24 '16 12:11 bboy-space

Hi, also voting for this feature. I neeeed it so much. @bboy-space maybe you've found a solution to this issue?

igorbuts avatar May 15 '18 23:05 igorbuts

I vote too for this feature, but it should be possible to scroll to the other rows. So if you choose to display 2 rows, it should be possible to replace rows 1 and 2 in the window by rows 2 and 3 etc.

acwolff avatar May 16 '18 07:05 acwolff

Hi @igorbuts , Yes I modified the library code and made a solution myself. For sure not the best, but I had to make it quick and it works. I can send you the file if needed.

bboy-space avatar May 16 '18 07:05 bboy-space

@bboy-space would be awesome. Maybe later, I will have time to dive into this and create a PR that resolves this issue.

igorbuts avatar May 16 '18 09:05 igorbuts

A maxRows option would be awesome.

For example to provide a preview when using justifiedGallery in combination with e.g. photoswipe (or a similar photo view software). Just show X rows but provide all images in the html to be viewable by the photo viewer.

After a quick look at the code it would be relative trivial to implement if hooked in at the beginning of flushRow(). Just compare this.rows count to to the maxRows setting count and return if they are equal.

git-marijus avatar Jan 09 '19 20:01 git-marijus

Looks like this is fixed in 3.8.1

git-marijus avatar Jun 15 '20 09:06 git-marijus