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

Any way to define a minimum number of panels to swipe? moveCount? #838

Open
TheGameKnave opened this issue Nov 15, 2023 · 1 comment
Open
Assignees
Labels
🔖4.x v4.x~ related issue ❓Question Asking question about @egjs/Flicking

Comments

@TheGameKnave
Copy link

Description

I'd like to be able to swipe 2 panels at once in some circumstances; I have a page view with a large panel and 2 half-panels on either side. I'd like to swipe from one side to the other without an awkward land in the middle. I see that moveCount is an option for a nav-button plugin, but doesn't seem to be available for vanilla.

@malangfox malangfox self-assigned this Nov 15, 2023
@malangfox malangfox added ❓Question Asking question about @egjs/Flicking 🔖4.x v4.x~ related issue labels Nov 15, 2023
@malangfox
Copy link
Contributor

Hello @TheGameKnave.

There is no option to define a minimum number of panels to move when snapping.
However, it seems that we can implement it through the willChange event.

There are two demos, following what you left in the issue.
demo 1 - at least two panels move by swiping
demo 2 - at least two panels move by swiping when the drag starts outside of the center panel.

If this implementation isn't what you had in mind, or if you have additional questions, please feel free to leave a comment!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔖4.x v4.x~ related issue ❓Question Asking question about @egjs/Flicking
Projects
None yet
Development

No branches or pull requests

2 participants