ts1 / flipbook-vue

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

canFlipLeft / Right causes navigational arrows to blink #46

Open piotrku opened 3 years ago

piotrku commented 3 years ago

When using: :class="{ disabled: !flipbook.canFlipLeft }" navigational arrows are in fact disabled when you reach the first/last page which is good. but they also get the disabled state during the page transitions, which looks strange and even annoying. I think that another computed boolean value like pageInTransition would solve the issue.

ts1 commented 3 years ago

I will consider adding pageInTransition. Since flipLeft only works if canFlipLeft is actually true, it's not a good thing to change the behavior of canFlipLeft.

peaeater commented 3 years ago

I avoid the navigational arrow blink by checking the flipbook's page number instead of canFlipLeft. :class="{ disabled: flipbook.page === 1 }" Similarly, the flip right button can check the flipbook's page against the page count. :class="{ disabled: flipbook.page === flipbook.numPages }"