diff options
| author | Tusooa Zhu <tusooa@kazv.moe> | 2021-08-02 19:11:59 -0400 |
|---|---|---|
| committer | Tusooa Zhu <tusooa@kazv.moe> | 2022-03-13 12:00:44 -0400 |
| commit | 29cd8fbd3bd9f936d2639a2edd773e1245b0b5a5 (patch) | |
| tree | 6058c29bd3242bd50a1333b5fb2e2ecb07fe1947 /src/components/pinch_zoom/pinch_zoom.js | |
| parent | a36673a6a8cace69979605f72bcc4d7a9d439814 (diff) | |
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.
Diffstat (limited to 'src/components/pinch_zoom/pinch_zoom.js')
| -rw-r--r-- | src/components/pinch_zoom/pinch_zoom.js | 5 |
1 files changed, 5 insertions, 0 deletions
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 }) + } } } |
