Skip to content

Bugfix #155 for justified layout – image size#162

Merged
Elfangor93 merged 2 commits intoJoomGalleryfriends:masterfrom
reilldesign:justified-image-size
Apr 2, 2025
Merged

Bugfix #155 for justified layout – image size#162
Elfangor93 merged 2 commits intoJoomGalleryfriends:masterfrom
reilldesign:justified-image-size

Conversation

@reilldesign
Copy link

As soon as the value of maxRowImgs is smaller than the number of all images, the value idealHeigh is ignored and the images are displayed very large.

@Elfangor93
Copy link
Member

Elfangor93 commented Mar 26, 2025

I dont think that a sustainable approach to just put a huge value for maxRowImgs. There are multiple loops in the source code being performed maxRowImgs amount of time.

Therefore I recommend set the maxRowImgs to be just a bit bigger than jg_category_view_numb_images. I did a counter proposal for this. See PR #163.

@reilldesign
Copy link
Author

reilldesign commented Mar 26, 2025

@Elfangor93 Since the maxRowImgs function is not relevant for us, I have now removed it completely.

@Elfangor93
Copy link
Member

Elfangor93 commented Mar 27, 2025

I highly recommend not to change anything in 3rd party libraries. As far as I know, we are using https://github.com/hikir1/ImgJust to create the justified layout. If possible use it as it is otherwise we (JoomGallery friends) have to maintain the code.

If you really want to change something in the JS library, I see two possibilities:

  1. Create a PR in the origin repository to keep the maintenance of the code at the owner. (Preferred solution)
  2. Or you copy the uncompressed source code to JoomGallery (forking), make the changes and then recompress it. This way we have both versions in our source and are able to properly maintain and debug the code.

I see, you already started solution 1: hikir1/ImgJust#4 👍

@reilldesign
Copy link
Author

@Elfangor93 see hikir1/ImgJust#5

@Elfangor93 Elfangor93 merged commit d64779f into JoomGalleryfriends:master Apr 2, 2025
@reilldesign reilldesign deleted the justified-image-size branch May 26, 2025 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants