Skip to content

Commit

Permalink
Backfill tests for DragRotate hander
Browse files Browse the repository at this point in the history
  • Loading branch information
jfirebaugh committed Aug 16, 2017
1 parent d67003d commit a0e2346
Show file tree
Hide file tree
Showing 3 changed files with 322 additions and 48 deletions.
2 changes: 1 addition & 1 deletion src/ui/handler/drag_rotate.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class DragRotateHandler {
if (this._ignoreEvent(e)) return;
if (this.isActive()) return;

window.document.addEventListener('mousemove', this._onMove);
window.document.addEventListener('mousemove', this._onMove, {capture: true});
window.document.addEventListener('mouseup', this._onUp);
/* Deactivate DragRotate when the window looses focus. Otherwise if a mouseup occurs when the window isn't in focus, DragRotate will still be active even though the mouse is no longer pressed. */
window.addEventListener('blur', this._onUp);
Expand Down
34 changes: 26 additions & 8 deletions test/node_modules/mapbox-gl-js-test/simulate_interaction.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a0e2346

Please sign in to comment.