Skip to content

Drag/touch pan moves in the wrong direction when map is pitched. #6111

@wayofthefuture

Description

@wayofthefuture

maplibre-gl-js version: 5.6.0 and 5.6.1

browser: Chrome/Edge

If the map is pitched and you attempt to drag pan upwards quickly, the map moves in the wrong (opposite) direction. Note that this also occurs on touch screens where a normal finger swipe easily triggers the behavior.

Steps to Trigger Behavior

  1. Load a pitched map. (60 degrees of pitch is enough)
  2. Quickly drag pan the map upwards. (similar to a finger swipe)

Link to Demonstration

https://codepen.io/wayofthefuture/pen/xbGvoJa?editors=0111

There are two buttons on this demo. The first button behaves normally, the second button causes the issue to occur. Note that each of these buttons use the same underlying logic, except the drag Y distance is increased.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions