diff --git a/package.json b/package.json index 99301266..d4d52023 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ "@fortawesome/free-regular-svg-icons": "^5.15.1", "@fortawesome/free-solid-svg-icons": "^5.15.1", "@fortawesome/vue-fontawesome": "^2.0.0", + "@kazvmoe-infra/pinch-zoom-element": "https://lily.kazv.moe/infra/pinch-zoom-element.git", "body-scroll-lock": "^2.6.4", "chromatism": "^3.0.0", "cropperjs": "^1.4.3", diff --git a/src/components/media_modal/media_modal.js b/src/components/media_modal/media_modal.js index c53eeccd..ca271f32 100644 --- a/src/components/media_modal/media_modal.js +++ b/src/components/media_modal/media_modal.js @@ -1,9 +1,9 @@ import StillImage from '../still-image/still-image.vue' import VideoAttachment from '../video_attachment/video_attachment.vue' import Modal from '../modal/modal.vue' +import PinchZoom from '../pinch_zoom/pinch_zoom.vue' import fileTypeService from '../../services/file_type/file_type.service.js' import GestureService from '../../services/gesture_service/gesture_service' -import Vuex from 'vuex' import { library } from '@fortawesome/fontawesome-svg-core' import { faChevronLeft, @@ -23,6 +23,7 @@ const MediaModal = { components: { StillImage, VideoAttachment, + PinchZoom, Modal }, computed: { @@ -54,6 +55,12 @@ const MediaModal = { return `translate(${this.offsets[0]}px, ${this.offsets[1]}px) scale(${this.scaling}, ${this.scaling})` } }, + data () { + return { + pinchZoomOptions: { + } + } + }, created () { this.mediaGesture = new GestureService.SwipeAndScaleGesture({ direction: GestureService.DIRECTION_LEFT, diff --git a/src/components/media_modal/media_modal.vue b/src/components/media_modal/media_modal.vue index c115fa63..48087534 100644 --- a/src/components/media_modal/media_modal.vue +++ b/src/components/media_modal/media_modal.vue @@ -4,18 +4,27 @@ class="media-modal-view" @backdropClicked="hide" > - +