var elem = document.querySelector('.main-gallery');
var flkty = new Flickity( elem, {
  // options
  // cellAlign: 'left',
  // contain: true
  setGallerySize: false,
  wrapAround: true
});
var elem = document.querySelector('.main-gallery');
var flkty = new Flickity( elem, {
  // options
  // cellAlign: 'left',
  // contain: true
  setGallerySize: false,
  wrapAround: true,
  imagesLoaded: true
});
fix issue with image position calculation