Fixes relations rendering timing bug

This commit is contained in:
Rainer Simon 2020-04-29 13:19:26 +02:00
parent d63acb7ab8
commit ebd47b6476
1 changed files with 3 additions and 1 deletions

View File

@ -25,7 +25,9 @@ export default class RelationsLayer extends EventEmitter {
this.drawingTool.on('cancelDrawing', () => this.emit('cancelDrawing'));
// Redraw on window resize
window.addEventListener('resize', this.recomputeAll);
window.addEventListener('resize', () => requestAnimationFrame(() => {
this.recomputeAll();
}));
}
/** Shorthand **/