From 29cd8fbd3bd9f936d2639a2edd773e1245b0b5a5 Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Mon, 2 Aug 2021 19:11:59 -0400 Subject: Add swipe-click handler to media modal Now swiping will correctly change the current media, and with a good preview. Clicking without swiping closes the overlay. --- src/components/pinch_zoom/pinch_zoom.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/components/pinch_zoom/pinch_zoom.js') diff --git a/src/components/pinch_zoom/pinch_zoom.js b/src/components/pinch_zoom/pinch_zoom.js index 75bb6082..36bebbce 100644 --- a/src/components/pinch_zoom/pinch_zoom.js +++ b/src/components/pinch_zoom/pinch_zoom.js @@ -2,5 +2,10 @@ import PinchZoom from '@kazvmoe-infra/pinch-zoom-element' export default { props: { + }, + methods: { + setTransform ({ scale, x, y }) { + this.$el.setTransform({ scale, x, y }) + } } } -- cgit v1.2.3-70-g09d2