only update nodes in viewport
This commit is contained in:
parent
982ca15d80
commit
e768162041
|
@ -87,6 +87,10 @@ function opr_active(gid,dict){
|
|||
pausecanvas(pause_icon);
|
||||
removecanvas(remove_icon);
|
||||
optioncanvas(option_icon);
|
||||
}else{
|
||||
let rect=node.getBoundingClientRect();
|
||||
if(rect.top>window.innerHeight||rect.top+rect.height<0)
|
||||
return 0;
|
||||
};
|
||||
for(let n of node.getElementsByTagName('div')){
|
||||
if(n.id in dictmap){
|
||||
|
@ -140,6 +144,10 @@ function opr_stopped(gid,dict){
|
|||
|
||||
removecanvas(remove_icon);
|
||||
optioncanvas(option_icon);
|
||||
}else{
|
||||
let rect=node.getBoundingClientRect();
|
||||
if(rect.top>window.innerHeight||rect.top+rect.height<0)
|
||||
return 0;
|
||||
};
|
||||
for(let n of node.getElementsByTagName('div')){
|
||||
if(n.id in dictmap){
|
||||
|
@ -216,6 +224,10 @@ function opr_waiting(gid,dict){
|
|||
unpausecanvas(unpause_icon);
|
||||
removecanvas(remove_icon);
|
||||
optioncanvas(option_icon);
|
||||
}else{
|
||||
let rect=node.getBoundingClientRect();
|
||||
if(rect.top>window.innerHeight||rect.top+rect.height<0)
|
||||
return 0;
|
||||
};
|
||||
for(let n of node.getElementsByTagName('div')){
|
||||
if(n.id in dictmap){
|
||||
|
|
Loading…
Reference in New Issue