We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trying to make mediumZoom working in the Divi builder I stumble over one issue.
Working Example:
When running mz with Antora (a documentation framework), you add it via
... var Mzm = (window.mzm = require('medium-zoom/dist/medium-zoom.min')) Mzm('span.image img, div.imageblock img', { background: '#fff', margin: 10 }) ...
Which results in a working zoomable image, example with the following code from the inspector:
<div class="imageblock"> <div class="content"> <img src="../_images/architecture/infinite_scale_data_platform.svg" alt="Infinite Scale Data Platform" width="500" class="medium-zoom-image"> </div> </div>
Failing Example with Divi:
Loading the library and initializing mediumZoom:
<script src="https://unpkg.com/[email protected]/dist/medium-zoom.js"> </script> <script> jQuery(document).ready(function( $ ) { mediumZoom($('div.data-zoomable, img').toArray()); }); </script>
Note, using [data-zoomable] did not work...
[data-zoomable]
Adding data-zoomable to the image CSS Class to make it zoomable.
data-zoomable
CSS Class
This is the code from the inspector:
<div class="et_pb_module et_pb_image et_pb_image_0 data-zoomable"> <span class="et_pb_image_wrap "> <img fetchpriority="high" decoding="async" width="740" height="900" src="https://dev.innovation-und-beratung.com/storage/2020/04/innovation-ok-with-failing-procedure.png" alt="innovation ok with failing procedure" title="Comfortable with failing procedures" srcset="https://dev.innovation-und-beratung.com/storage/2020/04/innovation-ok-with-failing-procedure.png 740w, https://dev.innovation-und-beratung.com/storage/2020/04/innovation-ok-with-failing-procedure- 480x584.png 480w" sizes="(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 740px, 100vw" class="wp-image-24617 medium-zoom-image"> </span> </div>
Now, the following happens:
medium-zoom-image--hidden
medium-zoom-image
I can provide you a temproary view access to my dev site if required.
mediumZoom should show the zoomed image when using the Divi builder.
medium-zoom
The text was updated successfully, but these errors were encountered:
Could you reproduce in the sandbox by copying the Divi builder generated HTML?
It might be because of incorrect srcset, or attributes on the <img> that are copied to the zoomed image element and prevents it from rendering.
srcset
<img>
Sorry, something went wrong.
@francoischalifour I have written a docs-only PR that fixes the issue. Would be happy if that finds its way into readme.md
Successfully merging a pull request may close this issue.
Bug description
Trying to make mediumZoom working in the Divi builder I stumble over one issue.
Working Example:
When running mz with Antora (a documentation framework), you add it via
Which results in a working zoomable image, example with the following code from the inspector:
Failing Example with Divi:
Loading the library and initializing mediumZoom:
Note, using
[data-zoomable]
did not work...Adding
data-zoomable
to the imageCSS Class
to make it zoomable.This is the code from the inspector:
Now, the following happens:
medium-zoom-image--hidden
is added to the class containingmedium-zoom-image
✔️I can provide you a temproary view access to my dev site if required.
Expected behavior
mediumZoom should show the zoomed image when using the Divi builder.
Environment
medium-zoom
version: 1.1.0The text was updated successfully, but these errors were encountered: