diff --git a/source/javascripts/custom.js b/source/javascripts/custom.js index 2220e85..acff5d9 100644 --- a/source/javascripts/custom.js +++ b/source/javascripts/custom.js @@ -218,9 +218,6 @@ import { addNewClass, removeClass, throttle } from './class-module' next: true, }, keyboard: false, - url(image) { - return image.dataset.original - }, } const galleryViewer = $('.article-gallery') if (galleryViewer && galleryViewer.length > 0) { @@ -232,7 +229,15 @@ import { addNewClass, removeClass, throttle } from './class-module' } const photographyViewer = $('.photography-item') if (photographyViewer && photographyViewer.length > 0) { - photographyViewer.viewer(viewerConfig) + const temp = Object.assign( + { + url(image) { + return image.dataset.original + }, + }, + viewerConfig + ) + photographyViewer.viewer(temp) } // Plyr