Mercurial > hg > orthanc-stone
view Platforms/WebAssembly/defaults.js @ 228:210c1ce8e1a6 am
WasmViewport is no more a singleton
author | am@osimis.io |
---|---|
date | Thu, 14 Jun 2018 15:06:29 +0200 |
parents | 84844649a8fd |
children | b0ba3b38a23c |
line wrap: on
line source
var isPendingRedraw = false; function ScheduleRedraw() { if (!isPendingRedraw) { isPendingRedraw = true; //console.log('Scheduling a refresh of the viewport, as its content changed'); window.requestAnimationFrame(function() { isPendingRedraw = false; viewport.Redraw(); }); } }