ts1 / flipbook-vue

3D page flip effect for Vue.js
https://ts1.github.io/flipbook-vue/
614 stars 158 forks source link

How to setup touch&swipe for images inside viewport. #83

Closed RunaTec closed 1 year ago

RunaTec commented 1 year ago

I am enthusiastic about your flipbook-vue component and use it in my current Quasar project. It works very well. Thanks :)

But I have a problem:

After zooming, I can't move the images with the mouse inside the viewport. But you can do that in your deployed demo. Do you use additional components to touch & swipe the images in your demo? Or am I missing something when setting up flipbook?

(I have to use the mouse wheel to zoom and cannot set the center of the zoom. That's why I absolutely need this image/viewport move.)

    <flipbook class="flipbook"
              :key="this.flipKey"
              v-touch-swipe.mouse="this.handleTouchSwipe"
              :style="this.pdfPosition"
              :ambient="this.flipAmbient"
              :singlePage="this.flipSinglepage"
              :pages="this.flipPages"
              :pagesHiRes="this.flipPages"
              :startPage="this.flipStartPage"
              :dragToFlip="this.flipDragToFlip"
              :nPolygons="this.flipNPolygons"
              :flipDuration="this.flipDuration"
              :zooms="this.flipZooms"
              :clickToZoom="this.flipClickToZoom"
              @flip-left-start="onFlipLeftStart"
              @flip-left-end="onFlipLeftEnd"
              @flip-right-start="onFlipRightStart"
              @flip-right-end="onFlipRightEnd"
              @zoom-start="onZoomStart"
              @zoom-end="onZoomEnd"
              @wheel="onWheel"
              ref="fb"
              v-slot="flipbook">

this.flipClickToZoom <-- false this.onWheel <-- zooming with this.$refs.fb.zoomOut() / .zoomIn() this.flipDragToFlip <-- false

flipping <-- with this.$refs.fb.flipRight()

ts1 commented 1 year ago

Could you provide me with minimal working code that reproduces your problem? You may send it to me privately via email.

Flipbook is so complicated that if you try to make any changes from the outside, it is likely to crash...