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

Properly modify scroll_location #16498

Merged
merged 1 commit into from Apr 17, 2017
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

@@ -540,10 +540,10 @@ impl Window {
}

/// Helper function to send a scroll event.
fn scroll_window(&self, scroll_location: ScrollLocation, phase: TouchEventType) {
fn scroll_window(&self, mut scroll_location: ScrollLocation, phase: TouchEventType) {
// Scroll events snap to the major axis of movement, with vertical
// preferred over horizontal.
if let ScrollLocation::Delta(mut delta) = scroll_location {
if let ScrollLocation::Delta(ref mut delta) = scroll_location {
if delta.y.abs() >= delta.x.abs() {
delta.x = 0.0;
} else {
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.