mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-07-06 00:14:25 +03:00
fix прокрутки комментов, теперь большие комменты корректно центрируются на экране
This commit is contained in:
parent
78420d1459
commit
929f8867ab
|
@ -215,7 +215,12 @@ var lsCmtTreeClass = new Class({
|
||||||
'y': 0
|
'y': 0
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.docScroller.start(0,$('comment_id_'+idComment).getPosition().y-window.getSize().y/2);
|
var cmt=$('comment_id_'+idComment);
|
||||||
|
var deltaY=cmt.getDimensions().height/2-window.getSize().y/2;
|
||||||
|
if (deltaY>0) {
|
||||||
|
deltaY=0;
|
||||||
|
}
|
||||||
|
this.docScroller.start(0,cmt.getPosition().y+deltaY);
|
||||||
if (this.iCommentIdLastView) {
|
if (this.iCommentIdLastView) {
|
||||||
$('comment_content_id_'+this.iCommentIdLastView).removeClass('view');
|
$('comment_content_id_'+this.iCommentIdLastView).removeClass('view');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue