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
parent
c9324a6a74
commit
fb81eb0c7f
|
@ -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){
|
||||
$.ccio.cx({f:'monitor',ff:'watch_on',id:e.mid},user)
|
||||
}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;
|
||||
case'watch_off':
|
||||
|
|
Loading…
Reference in New Issue