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:
parent
57154b2853
commit
64ec415a54
@ -3398,8 +3398,17 @@ RED.view = (function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
var pendingRedraw;
|
||||||
|
|
||||||
function redraw() {
|
function redraw() {
|
||||||
requestAnimationFrame(_redraw);
|
if (RED.view.DEBUG_SYNC_REDRAW) {
|
||||||
|
_redraw();
|
||||||
|
} else {
|
||||||
|
if (pendingRedraw) {
|
||||||
|
cancelAnimationFrame(pendingRedraw);
|
||||||
|
}
|
||||||
|
pendingRedraw = requestAnimationFrame(_redraw);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function _redraw() {
|
function _redraw() {
|
||||||
|
Loading…
Reference in New Issue
Block a user