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] swipeable only from the far left (or right) area of the page #2263

Merged
merged 1 commit into from
Nov 26, 2015

Conversation

alitaheri
Copy link
Member

Closes #1384.

Only swipe open the LeftNav from far left or far right.

if (!this.state.open) {
if (this.props.openRight) {
// If openRight is true calculate from the far right
if (e.touches[0].pageX < document.body.offsetWidth - 30) return;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use a constant variable for the 30?

@alitaheri alitaheri force-pushed the left-nav-limit-swipe-area branch from f3da463 to 8447fa8 Compare November 25, 2015 00:47
@alitaheri
Copy link
Member Author

@oliviertassinari Please check again.

@alitaheri alitaheri changed the title Made LeftNav swipable only from far left (or right) [LeftNav] swipeable only from the far left (or right) area of the page Nov 25, 2015
@oliviertassinari
Copy link
Member

@subjectix Thanks 👍

oliviertassinari added a commit that referenced this pull request Nov 26, 2015
[LeftNav] swipeable only from the far left (or right) area of the page
@oliviertassinari oliviertassinari merged commit 414fc5a into mui:master Nov 26, 2015
@alitaheri alitaheri deleted the left-nav-limit-swipe-area branch November 26, 2015 14:48
@alitaheri
Copy link
Member Author

Thank you ^.^

@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.

slider and leftSide Nav Menu on dragging event
3 participants