Skip to content

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

Merged
kkaefer merged 1 commit into
masterfrom
separate-rotate-pitch-events
Oct 15, 2019
Merged

kkaefer merged 1 commit into
masterfrom
separate-rotate-pitch-events

Conversation

@kkaefer

@kkaefer kkaefer commented Oct 15, 2019

Copy link
Copy Markdown
Member

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.


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
Copy Markdown
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