flipbook-vue icon indicating copy to clipboard operation
flipbook-vue copied to clipboard

Question: How to implement zoom on double click?

Open Marchiuzzz opened this issue 4 years ago • 1 comments

I know I can use the flipbook's zoomIn() method but I've tried attaching a @dblclick event directly on flipbook component but it seems that it does not fire it for some reason, am I missing something?

<flipbook
        ref="container"
        @dblclick="zoomFlipbook"
        :startPage="page"
        :pages="images" 
        :zooms="zooms"
        @zoom-start="setZoom" 
        @flip-left-start="nextPage" 
        @flip-right-start="nextPage"
        @flip-left-end="updateImagePositions"
        @flip-right-end="updateImagePositions">
        </flipbook>


in methods I have

zoomFlipbook(){
      this.$refs.container.zoomIn();
}

Marchiuzzz avatar Jul 02 '21 14:07 Marchiuzzz

Sorry for the delay in replying. You can set up a native dblclick handler by writing like the following:

        @dblclick.native="zoomFlipbook"

ts1 avatar Jul 09 '21 06:07 ts1