Clean up
This commit is contained in:
parent
29cd8fbd3b
commit
23a6b86ef3
3 changed files with 15 additions and 45 deletions
|
@ -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) {
|
||||
|
|
|
@ -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'"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue