Skip to content

Commit

Permalink
fix(ui): Combinations of scrolling and touch events also should not c…
Browse files Browse the repository at this point in the history
…ause any jank
  • Loading branch information
Hypfer committed Oct 6, 2021
1 parent adcd117 commit e36c40f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/src/map/Map.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ class Map extends React.Component<MapProps, MapState > {

this.draw();

if (this.pendingInternalDrawableStateUpdate) {
if (this.pendingInternalDrawableStateUpdate && !this.activeScrollEvent) {
this.pendingInternalDrawableStateUpdate = false;
this.updateInternalDrawableState();
}
Expand Down Expand Up @@ -665,7 +665,7 @@ class Map extends React.Component<MapProps, MapState > {
this.scrollTimeout = setTimeout(() => {
this.activeScrollEvent = false;

if (this.pendingInternalDrawableStateUpdate) {
if (this.pendingInternalDrawableStateUpdate && !this.activeTouchEvent) {
this.pendingInternalDrawableStateUpdate = false;
this.updateInternalDrawableState();
}
Expand Down

0 comments on commit e36c40f

Please sign in to comment.