aboutsummaryrefslogtreecommitdiff
path: root/src/components/pinch_zoom
diff options
context:
space:
mode:
authorIlja <ilja@ilja.space>2022-03-20 09:53:57 +0100
committerIlja <ilja@ilja.space>2022-03-20 09:53:57 +0100
commitd0bfd9a80826a7cdb37e1a84cf70ab8a44c3579e (patch)
tree4a0fbf2367e7bb8f4d2e71cb2499f15416bf97ef /src/components/pinch_zoom
parentf9393b0dab22279e9bdb97a1cf52fecfe278a4a7 (diff)
parent6f1d953642473412c094e5b723eb479e2b19a542 (diff)
Merge branch 'develop' of https://git.pleroma.social/pleroma/pleroma-fe into feat/report-notification
Diffstat (limited to 'src/components/pinch_zoom')
-rw-r--r--src/components/pinch_zoom/pinch_zoom.js13
-rw-r--r--src/components/pinch_zoom/pinch_zoom.vue11
2 files changed, 24 insertions, 0 deletions
diff --git a/src/components/pinch_zoom/pinch_zoom.js b/src/components/pinch_zoom/pinch_zoom.js
new file mode 100644
index 00000000..82670ddf
--- /dev/null
+++ b/src/components/pinch_zoom/pinch_zoom.js
@@ -0,0 +1,13 @@
+import PinchZoom from '@kazvmoe-infra/pinch-zoom-element'
+
+export default {
+ methods: {
+ setTransform ({ scale, x, y }) {
+ this.$el.setTransform({ scale, x, y })
+ }
+ },
+ created () {
+ // Make lint happy
+ (() => PinchZoom)()
+ }
+}
diff --git a/src/components/pinch_zoom/pinch_zoom.vue b/src/components/pinch_zoom/pinch_zoom.vue
new file mode 100644
index 00000000..18d69719
--- /dev/null
+++ b/src/components/pinch_zoom/pinch_zoom.vue
@@ -0,0 +1,11 @@
+<template>
+ <pinch-zoom
+ class="pinch-zoom-parent"
+ v-bind="$attrs"
+ v-on="$listeners"
+ >
+ <slot />
+ </pinch-zoom>
+</template>
+
+<script src="./pinch_zoom.js"></script>