Sha256: edd16d980faab017889c3558dfb14b609669b77a473570b3171fa525c708469e

Contents?: true

Size: 710 Bytes

Versions: 9

Compression:

Stored size: 710 Bytes

Contents

import $ from 'jquery'

import { init } from '../core/events'

init(function (root) {
  $(root).find('[data-behavior~="zoom"]').magnificPopup({
    type: 'image',
    closeOnContentClick: false,
    closeBtnInside: false,
    mainClass: 'mfp-with-zoom mfp-img-mobile',
    zoom: {
      enabled: true,
      duration: 150
    }
  })

  $(root).find('[data-behavior~="gallery"]').each(function () {
    $(this).magnificPopup({
      delegate: 'a',
      type: 'image',
      closeOnContentClick: false,
      closeBtnInside: false,
      mainClass: 'mfp-with-zoom mfp-img-mobile',
      gallery: {
        enabled: true
      },
      zoom: {
        enabled: true,
        duration: 150
      }
    })
  })
})

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
trestle-0.9.8 frontend/js/components/gallery.js
trestle-0.9.7 frontend/js/components/gallery.js
trestle-0.9.6 frontend/js/components/gallery.js
trestle-0.9.5 frontend/js/components/gallery.js
trestle-0.9.4 frontend/js/components/gallery.js
trestle-0.9.3 frontend/js/components/gallery.js
trestle-0.9.2 frontend/js/components/gallery.js
trestle-0.9.1 frontend/js/components/gallery.js
trestle-0.9.0 frontend/js/components/gallery.js