mirror of
https://github.com/nasa/openmct.git
synced 2025-03-03 12:57:16 +00:00
[Performance] Only invoke apply on size changes
...as detected from mct-chart.
This commit is contained in:
parent
9f0114eb39
commit
0f56fd2561
@ -146,6 +146,7 @@ define(
|
|||||||
if (canvas.width !== canvas.offsetWidth ||
|
if (canvas.width !== canvas.offsetWidth ||
|
||||||
canvas.height !== canvas.offsetHeight) {
|
canvas.height !== canvas.offsetHeight) {
|
||||||
doDraw(scope.draw);
|
doDraw(scope.draw);
|
||||||
|
scope.$apply();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -181,7 +182,7 @@ define(
|
|||||||
canvas.addEventListener("webglcontextlost", fallbackFromWebGL);
|
canvas.addEventListener("webglcontextlost", fallbackFromWebGL);
|
||||||
|
|
||||||
// Check for resize, on a timer
|
// Check for resize, on a timer
|
||||||
activeInterval = $interval(drawIfResized, 1000);
|
activeInterval = $interval(drawIfResized, 1000, 0, false);
|
||||||
|
|
||||||
// Watch "draw" for external changes to the set of
|
// Watch "draw" for external changes to the set of
|
||||||
// things to be drawn.
|
// things to be drawn.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user