Skip to content

Commit

Permalink
fixed(display): resolve slight text flickering during long animations
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Deubler <[email protected]>
  • Loading branch information
TerminalTim committed Sep 6, 2024
1 parent c3dd04f commit 6ae7b06
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/display/src/MapViewListener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ const EVENT_MVC = 'mapviewchange';
const EVENT_MVC_START = EVENT_MVC + 'start';
const EVENT_MVC_END = EVENT_MVC + 'end';
const MAPVIEWCHANGE_MS = 1e3 / 30;
let MAPVIEWCHANGE_END_DELAY_MS = 10;
// 16.666ms -> 1fps to avoid end mapviewchangeend events during running animations
let MAPVIEWCHANGE_END_DELAY_MS = 1000/60;

const SYNC = true;

Expand Down Expand Up @@ -146,6 +147,7 @@ class MapViewListener {

const curCenter = map.getCenter();

console.log('triggerend');
this.trigger(EVENT_MVC_END, {
changed: {
center: this.centerChanged(curCenter)
Expand Down

0 comments on commit 6ae7b06

Please sign in to comment.