Fix scrolling when clicking thumbnail.

Use position rather than offset to get top of monitor, since we want it relative to the canvas.
Also, don’t subtract header height since it’s not in the canvas.
merge-requests/180/head
caedmon 2019-01-14 09:41:22 -08:00
parent c9324a6a74
commit fb81eb0c7f
1 changed files with 1 additions and 1 deletions

View File

@ -639,7 +639,7 @@ $(document).ready(function(e){
if($("#monitor_live_"+e.mid+user.auth_token).length===0||$.ccio.mon[e.ke+e.mid+user.auth_token].watch!==1){ if($("#monitor_live_"+e.mid+user.auth_token).length===0||$.ccio.mon[e.ke+e.mid+user.auth_token].watch!==1){
$.ccio.cx({f:'monitor',ff:'watch_on',id:e.mid},user) $.ccio.cx({f:'monitor',ff:'watch_on',id:e.mid},user)
}else{ }else{
$("#main_canvas").animate({scrollTop:$("#monitor_live_"+e.mid+user.auth_token).offset().top-($('#main_header').height()+10)},500); $("#main_canvas").animate({scrollTop:$("#monitor_live_"+e.mid+user.auth_token).position().top},500);
} }
break; break;
case'watch_off': case'watch_off':