Skip to content

Commit

Permalink
only show zoom cursor when zoom on hover enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
metamoni committed Sep 23, 2022
1 parent 7b1b468 commit 71fdbfa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion snippets/product-thumbnail.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@
if mobile_layout == 'columns' and media_count > 1
assign mobile_columns = 2
endif

if section.settings.image_zoom == 'hover'
assign image_class = 'image--original'
endif
-%}

{%- capture sizes -%}
Expand Down Expand Up @@ -87,7 +91,7 @@

<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 }}%;">
{{ media.preview_image | image_url: width: 1946 | image_tag:
class: "image--original",
class: image_class,
loading: lazy,
sizes: sizes,
widths: '246, 493, 600, 713, 823, 990, 1100, 1206, 1346, 1426, 1646, 1946',
Expand Down

0 comments on commit 71fdbfa

Please sign in to comment.