- Issue created by @ioana apetri
- Status changed to Needs review
about 1 year ago 10:40am 29 September 2023 - 🇮🇳India sarwan_verma
Hi @ioana apetri,
I have fixed issue once function and also attached patch.
Please review and verify. - Status changed to Needs work
about 1 year ago 10:46am 29 September 2023 - 🇷🇴Romania ioana apetri
Quick fix:
My image is now zoomed in and out with the fallowing code in the "drupal.imagefieldzoom.js" file.
$(once('init', this)). parent( '.image-zoom'). zoom({ url: original_urls[$(this).attr('fid')], on: drupalSettings.imageFieldZoom.image_zoom_style, touch: drupalSettings.imageFieldZoom.image_touchscreen_compatible, magnify: drupalSettings.imageFieldZoom.image_magnify, duration: drupalSettings.imageFieldZoom.image_fade_duration });
Also I modified the dependencies library to be the fallowing:
- core/jquery
- core/drupal
- core/once
- core/drupalSettings - 🇷🇴Romania ioana apetri
I think also this part $(this).once('init') needs to be changed according the documentation.
- Status changed to Needs review
about 1 year ago 11:02am 29 September 2023 - Status changed to Needs work
about 1 year ago 11:50am 29 September 2023 - 🇷🇴Romania ioana apetri
In case JQuery is used, than we need to replase $ sign with JQuery word.If you want to use $ sign you have to use this:
(function ($, Drupal,once, drupalSettings) { - Status changed to Needs review
about 1 year ago 12:08pm 29 September 2023