aboutsummaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/components')
-rw-r--r--src/components/media_modal/media_modal.js23
-rw-r--r--src/components/media_modal/media_modal.vue7
2 files changed, 6 insertions, 24 deletions
diff --git a/src/components/media_modal/media_modal.js b/src/components/media_modal/media_modal.js
index b4c0cfb4..2f00f5f9 100644
--- a/src/components/media_modal/media_modal.js
+++ b/src/components/media_modal/media_modal.js
@@ -37,7 +37,9 @@ const MediaModal = {
return {
loading: false,
swipeDirection: GestureService.DIRECTION_LEFT,
- swipeThreshold: 50
+ swipeThreshold: 50,
+ pinchZoomMinScale: 1,
+ pinchZoomScaleResetLimit: 1.2
}
},
computed: {
@@ -62,25 +64,6 @@ const MediaModal = {
type () {
return this.currentMedia ? this.getType(this.currentMedia) : null
},
- scaling () {
- return this.$store.state.mediaViewer.swipeScaler.scaling
- },
- offsets () {
- return this.$store.state.mediaViewer.swipeScaler.offsets
- },
- transform () {
- return `translate(${this.offsets[0]}px, ${this.offsets[1]}px) scale(${this.scaling}, ${this.scaling})`
- }
- },
- created () {
- // this.mediaGesture = new GestureService.SwipeAndScaleGesture({
- // callbackPositive: this.goNext,
- // callbackNegative: this.goPrev,
- // swipePreviewCallback: this.handleSwipePreview,
- // swipeEndCallback: this.handleSwipeEnd,
- // pinchPreviewCallback: this.handlePinchPreview,
- // pinchEndCallback: this.handlePinchEnd
- // })
},
methods: {
getType (media) {
diff --git a/src/components/media_modal/media_modal.vue b/src/components/media_modal/media_modal.vue
index e385024e..76cf4319 100644
--- a/src/components/media_modal/media_modal.vue
+++ b/src/components/media_modal/media_modal.vue
@@ -16,12 +16,11 @@
ref="pinchZoom"
class="modal-image-container-inner"
selector=".modal-image"
- allow-pan-min-scale="1"
- min-scale="1"
- reset-to-min-scale-limit="1.2"
reach-min-scale-strategy="reset"
stop-propagate-handled="stop-propgate-handled"
- :inner-class="'modal-image-container-inner'"
+ :allow-pan-min-scale="pinchZoomMinScale"
+ :min-scale="pinchZoomMinScale"
+ :reset-to-min-scale-limit="pinchZoomScaleResetLimit"
>
<img
v-if="type === 'image'"