Search code examples
galleria

Galleria: Won't render without a window intervention?


New to Galleria - and trying to evaluate it for an angular system, ripping its image data from a google spreadsheet..

http://codepen.io/kylane/pen/amqWPw

function readytogo() {
  window.alert('This is just a prototype');
  Galleria.configure({
    transition: 'fade',
    imageCrop: true,
    fullscreenDoubleTap: true,
    responsive: true,
    trueFullscreen: true,
    autoplay: 10000,
    lightbox: true,
    swipe: 'auto',
    showCounter: false,
    showInfo: true
  });
  Galleria.run('#galleria');
  $('#galleria').fadeIn('slow');
}

window.onload = readytogo;

Without the window.alert, the gallery won't render - and I'm not sure why.

Any advice would be greatly appreciated!


Solution

  • Turned out, I wasnt waiting for the google sheet JSON to load before rendering...

    ... my bad.