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

Fire 'rotate' and 'pitch' events only when their value changed #8872

Merged
merged 1 commit into from
Oct 15, 2019

Conversation

kkaefer
Copy link
Member

@kkaefer kkaefer commented Oct 15, 2019

Fixes #8842, and supersedes #8869 with a more concise implementation.

Also fixes a bug where the pitch event was still reading the old pitch value. Now, that value reflects the change that the user made.

@@ -151,7 +178,7 @@ test('DragRotateHandler pitches in response to a control-left-click drag', (t) =
map.on('pitchend', pitchend);

simulate.mousedown(map.getCanvas(), {buttons: 1, button: 0, ctrlKey: true});
simulate.mousemove(map.getCanvas(), {buttons: 1, ctrlKey: true, clientX: 10, clientY: 10});
simulate.mousemove(map.getCanvas(), {buttons: 1, ctrlKey: true, clientX: 10, clientY: -10});
Copy link
Member Author

Choose a reason for hiding this comment

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

Moving downwards only rotates, and doesn't pitch. Change the value to move upwards so that the map gets pitched.

@kkaefer kkaefer requested a review from a team October 15, 2019 12:35
@kkaefer kkaefer self-assigned this Oct 15, 2019
@kkaefer kkaefer added this to the release-sangria milestone Oct 15, 2019
@kkaefer kkaefer merged commit 4a4bc6a into master Oct 15, 2019
@kkaefer kkaefer deleted the separate-rotate-pitch-events branch October 15, 2019 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rotate and pitch events are fired at the same time
2 participants