• Resolved ferra_andre

    (@ferra_andre)


    Hi, I think I found a bug in the masonry layout. It did not display the photos in columns, they were shown full width.
    I found that the idealColumns variable was not passed correctly to the script that injects the css.

    Turning the value into string works correctly!

    This is the change I made, from:
    $ grid.css ('column-count', idealColumns);
    to
    $ grid.css ('column-count', idealColumns.toString ());

    on line 1097 of the photonic-swipebox.js file.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Sayontan Sinha

    (@sayontan)

    This is interesting. The column-count should be a numeric value, and this code has worked for 2 years now. What is the value you are passing for columns?

    Plugin Author Sayontan Sinha

    (@sayontan)

    Hi,
    Following up here – can you let me know what value you had for columns?

    Thread Starter ferra_andre

    (@ferra_andre)

    Sorry, I missed the notification.
    I tried them all, from auto to a fixed number, always the same problem.

    there was data-photonic-gallery-columns = "X" but not style = "column-count: X;"

    Plugin Author Sayontan Sinha

    (@sayontan)

    Still not seeing why this would cause a problem – jQuery’s official documentation says that this accepts numbers and strings.

    In any case, I will add this to the code, but this is really puzzling.

    Plugin Author Sayontan Sinha

    (@sayontan)

    I added this to version 2.13.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Bug in the masonry layout’ is closed to new replies.