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

[LeftNav] Feature/swipe to open #868

Merged
merged 3 commits into from
Jun 20, 2015

Conversation

pomerantsev
Copy link
Contributor

Resolves #848.

@hai-cea
Copy link
Member

hai-cea commented Jun 18, 2015

@pomerantsev I think it works pretty well. One thing that does feel weird is that the nav menu will open on a left swipe as well as a right swipe. It seems like it should only open on a swipe to the right?

Same issue with closing the menu, it should only close with a swipe to the left. But, that issue seems to have always been there.

@hai-cea hai-cea changed the title Feature/swipe to open [LeftNav] Feature/swipe to open Jun 19, 2015
@pomerantsev
Copy link
Contributor Author

@hai-cea I created an issue #900.
The way I fixed it here is I'm just calculating whether the nav panel is more than half way open or not, and I'm opening or closing it based on that.
So no matter which way you're swiping now, the nav will only close if you've swiped sufficiently.
The ratio can be adjusted. Say, you need to swipe 20% or even just one pixel in the desired direction, but implementing it like this (with a middle point) was slightly easier.

@hai-cea
Copy link
Member

hai-cea commented Jun 20, 2015

@pomerantsev ok looks great 👍 Thanks!

hai-cea pushed a commit that referenced this pull request Jun 20, 2015
@hai-cea hai-cea merged commit e88b2a5 into mui:master Jun 20, 2015
@pomerantsev pomerantsev deleted the feature/swipe-to-open branch June 21, 2015 07:26
@CumpsD
Copy link
Contributor

CumpsD commented Jun 22, 2015

Nice one! Looking forward to the next release :)

@CumpsD
Copy link
Contributor

CumpsD commented Jun 24, 2015

I'm getting all kinds of weird behavior with this. I swipe the menu in from the left, I tap next to it (it closes automatically), I tap anywhere again, it pops open again (without the dark background overlay), and then it is in a weird state where tapping on it closes it (without animation).

@pomerantsev
Copy link
Contributor Author

@CumpsD thanks for noticing it.

@zannager zannager added the docs Improvements or additions to the documentation label Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[LeftNav] Support show LeftNav with wipe gesture
4 participants