Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: How to implement zoom on double click? #52

Open
Marchiuzzz opened this issue Jul 2, 2021 · 1 comment
Open

Question: How to implement zoom on double click? #52

Marchiuzzz opened this issue Jul 2, 2021 · 1 comment

Comments

@Marchiuzzz
Copy link

Marchiuzzz commented Jul 2, 2021

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();
}
@ts1
Copy link
Owner

ts1 commented Jul 9, 2021

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

        @dblclick.native="zoomFlipbook"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants