Skip to content

Commit

Permalink
remove product__media-container class
Browse files Browse the repository at this point in the history
  • Loading branch information
metamoni committed Oct 14, 2022
1 parent 6e475e5 commit 6d13104
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions assets/magnify.js
Expand Up @@ -30,7 +30,8 @@ function magnify(image, zoomRatio) {
overlay.onmouseleave = () => overlay.remove();
}

function enableZoomOnHover(images, zoomRatio) {
function enableZoomOnHover(zoomRatio) {
const images = document.querySelectorAll('.image-magnify__hover');
images.forEach(image => {
image.onclick = (event) => {
magnify(image, zoomRatio);
Expand All @@ -39,5 +40,4 @@ function enableZoomOnHover(images, zoomRatio) {
});
}

const hoverableImages = document.querySelectorAll('.image-magnify__hover');
hoverableImages && enableZoomOnHover(hoverableImages, 2);
enableZoomOnHover(2);
2 changes: 1 addition & 1 deletion assets/section-main-product.css
Expand Up @@ -1168,7 +1168,7 @@ a.product__text {
}
}

.product__media-container {
.js .product__media {
overflow: hidden !important;
}

Expand Down
2 changes: 1 addition & 1 deletion snippets/product-thumbnail.liquid
Expand Up @@ -89,7 +89,7 @@
</span>
{%- endif -%}

<div class="product__media product__media-container media media--transparent gradient global-media-settings" style="padding-top: {{ 1 | divided_by: media.preview_image.aspect_ratio | times: 100 }}%;">
<div class="product__media media media--transparent gradient global-media-settings" style="padding-top: {{ 1 | divided_by: media.preview_image.aspect_ratio | times: 100 }}%;">
{{ media.preview_image | image_url: width: 1946 | image_tag:
class: image_class,
loading: lazy,
Expand Down

0 comments on commit 6d13104

Please sign in to comment.