1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Add RED.view.DEBUG_SYNC_REDRAW to disable requestAnimationFrame

References #2631
This commit is contained in:
Nick O'Leary 2020-07-06 21:01:14 +01:00
parent 57154b2853
commit 64ec415a54
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -3398,8 +3398,17 @@ RED.view = (function() {
}
var pendingRedraw;
function redraw() {
requestAnimationFrame(_redraw);
if (RED.view.DEBUG_SYNC_REDRAW) {
_redraw();
} else {
if (pendingRedraw) {
cancelAnimationFrame(pendingRedraw);
}
pendingRedraw = requestAnimationFrame(_redraw);
}
}
function _redraw() {