Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Thomas Griffin

    (@griffinjt)

    What about trying just $(window).trigger('resize');?

    Thread Starter Giancarlo Mosso

    (@gmosso)

    Hello Thomas,
    thank you for your reply.
    I had already tried triggering the resize event, I tried again to confirm and unfortunately it does not work.
    The resize event is fired (e.g. if a attach an event handler that logs a string I can see the string logged in the console).
    But it does not force layout rendering. Instead if I resize manually the window the layout is rendered correctly.
    That is why in the 1.3.x version I had used the “smartresize” event, but in this version it does not work anymore.
    If I don’t find a solution I’ll have to stay on version 1.3.x or use a different plugin.
    Giancarlo

    Plugin Author Thomas Griffin

    (@griffinjt)

    I researched it a little bit more. It looks like with isotope v3 (which is the library we use for resizing), they removed the smartresize function/event. Let me see if I can dig in and find a different way to make this happen.

    Thread Starter Giancarlo Mosso

    (@gmosso)

    Hi Thomas,
    by digging into the code of your plugin I found the solution. I’ll share here in the hope it could be useful to someone else.
    The call to be done is:
    envira_isotopes[<galleryNumber>].enviratope('layout');
    envira_isotopes is an array defined by your plugin, so this solution will work as long as you don’t rename that variable, in case I’ll fix my code.
    In any case thank you for your support and willing to solve my problem.
    Giancarlo

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Javascript event to trigger gallery layout render’ is closed to new replies.