From 918006f5cb65a94e6c910a730dbc7c331e160d51 Mon Sep 17 00:00:00 2001 From: Sam Therapy Date: Sun, 20 Feb 2022 16:30:49 -0600 Subject: [PATCH] Add pinch to zoom back Signed-off-by: Sam Therapy --- src/components/media_modal/media_modal.js | 6 +-- src/components/media_modal/media_modal.vue | 49 +++++++++++++++------- 2 files changed, 36 insertions(+), 19 deletions(-) diff --git a/src/components/media_modal/media_modal.js b/src/components/media_modal/media_modal.js index 6ebfec0f..15cd3964 100644 --- a/src/components/media_modal/media_modal.js +++ b/src/components/media_modal/media_modal.js @@ -22,9 +22,9 @@ const MediaModal = { components: { StillImage, VideoAttachment, + Modal, PinchZoom, - SwipeClick, - Modal + SwipeClick }, computed: { showing () { @@ -57,7 +57,7 @@ const MediaModal = { const considerableMoveRatio = 1 / 4 return window.innerWidth * considerableMoveRatio }, - pinchZoomMinScale: 1, + pinchZoomMinScale: 0.9, pinchZoomScaleResetLimit: 1.2 } }, diff --git a/src/components/media_modal/media_modal.vue b/src/components/media_modal/media_modal.vue index 894e10e5..97f79439 100644 --- a/src/components/media_modal/media_modal.vue +++ b/src/components/media_modal/media_modal.vue @@ -4,18 +4,37 @@ class="media-modal-view" @backdropClicked="hide" > - + + + + -