Better perf when window is hidden
This commit is contained in:
parent
08fa57caed
commit
34c404cf6c
|
@ -71,6 +71,9 @@ class Peaks extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
get targetDelay() {
|
get targetDelay() {
|
||||||
|
if (window.document.hidden) {
|
||||||
|
return 2 * 1000;
|
||||||
|
}
|
||||||
if (this.props.accommodateGraphAnimation) {
|
if (this.props.accommodateGraphAnimation) {
|
||||||
return 1000 / 70;
|
return 1000 / 70;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user