Skip to content

Commit 894658d

Browse files
committed
removed abandoned product image zoom library
1 parent 66e6713 commit 894658d

File tree

5 files changed

+3
-96
lines changed

5 files changed

+3
-96
lines changed

public/drift.min.js

Lines changed: 0 additions & 39 deletions
This file was deleted.

public/prodify-active-dropdown.js

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -220,26 +220,9 @@ class Prodify {
220220
addButtonTarget.replaceWith(addButtonSource)
221221
}
222222

223-
if (window.Drift) {
224-
this.reInitProductZoom()
225-
}
226223
})
227224
}
228225

229-
reInitProductZoom() {
230-
if (window.productZoom) {
231-
window.productZoom.destroy()
232-
233-
window.productZoom = new Drift(
234-
document.querySelector(`${window.productZoomContainerSelector} [data-zoom]`),
235-
{
236-
paneContainer: document.querySelector(`${window.productZoomContainerSelector}`),
237-
inlinePane: false,
238-
}
239-
)
240-
}
241-
}
242-
243226
getVariantData = () => {
244227
this.variantData =
245228
this.variantData || JSON.parse(this.el.querySelector(this.selectors.variantsJson).textContent)

public/prodify.js

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -243,26 +243,9 @@ class Prodify {
243243
addButtonTarget.replaceWith(addButtonSource)
244244
}
245245

246-
if (window.Drift) {
247-
this.reInitProductZoom()
248-
}
249246
})
250247
}
251248

252-
reInitProductZoom() {
253-
if (window.productZoom) {
254-
window.productZoom.destroy()
255-
256-
window.productZoom = new Drift(
257-
document.querySelector(`${window.productZoomContainerSelector} [data-zoom]`),
258-
{
259-
paneContainer: document.querySelector(`${window.productZoomContainerSelector}`),
260-
inlinePane: false,
261-
}
262-
)
263-
}
264-
}
265-
266249
getVariantData = () => {
267250
this.variantData =
268251
this.variantData || JSON.parse(this.el.querySelector(this.selectors.variantsJson).textContent)

sections/main-product.liquid

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,7 @@
1818
}
1919
],
2020
"default": "radio"
21-
}, {
22-
"type": "checkbox",
23-
"id": "enable_image_magnification",
24-
"label": "Enable Image Magnification",
25-
"default": true
26-
}
21+
}
2722
]
2823
}
2924
{% endschema %}
@@ -53,16 +48,12 @@
5348
</span>
5449
<div
5550
class="image-wrapper"
56-
style="padding-top: 137%; overflow: hidden;"
57-
data-image-zoom-container>
51+
style="padding-top: 137%; overflow: hidden;">
5852
{% if product.selected_variant and product.selected_variant.image %}
5953
{% assign media = product.selected_variant.image %}
6054
{% else %}
6155
{% assign media = product.featured_image %}
6256
{% endif %}
63-
{% if section.settings.enable_image_magnification %}
64-
{% render 'product-image-zoom-scripts', image: media, image_container: '[data-image-zoom-container]' %}
65-
{% endif %}
6657
<img
6758
src="{{ media | image_url }}"
6859
alt="{{ media.alt }}"
@@ -72,7 +63,7 @@
7263
width="{{ media.width }}"
7364
class="absolute h-full w-full object-cover"
7465
loading="eager"
75-
data-zoom="{{ media | image_url }}">
66+
>
7667
<h1 class="text-4xl z-50 relative">
7768
{{ product.selected_or_first_available_variant.options }}
7869
</h1>

snippets/product-image-zoom-scripts.liquid

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)