annotate Platforms/WebAssembly/defaults.js @ 222:84844649a8fd
am
continued: reusable applications
author |
am@osimis.io |
date |
Tue, 12 Jun 2018 17:21:15 +0200 |
parents |
|
children |
b0ba3b38a23c |
rev |
line source |
222
|
1 var isPendingRedraw = false;
|
|
2
|
|
3 function ScheduleRedraw()
|
|
4 {
|
|
5 if (!isPendingRedraw) {
|
|
6 isPendingRedraw = true;
|
|
7 //console.log('Scheduling a refresh of the viewport, as its content changed');
|
|
8 window.requestAnimationFrame(function() {
|
|
9 isPendingRedraw = false;
|
|
10 viewport.Redraw();
|
|
11 });
|
|
12 }
|
|
13 }
|