From 929f8867abfd94dcab8aff8029bea7a9d1290f48 Mon Sep 17 00:00:00 2001 From: Mzhelskiy Maxim Date: Sun, 3 May 2009 09:41:03 +0000 Subject: [PATCH] =?UTF-8?q?fix=20=D0=BF=D1=80=D0=BE=D0=BA=D1=80=D1=83?= =?UTF-8?q?=D1=82=D0=BA=D0=B8=20=D0=BA=D0=BE=D0=BC=D0=BC=D0=B5=D0=BD=D1=82?= =?UTF-8?q?=D0=BE=D0=B2,=20=D1=82=D0=B5=D0=BF=D0=B5=D1=80=D1=8C=20=D0=B1?= =?UTF-8?q?=D0=BE=D0=BB=D1=8C=D1=88=D0=B8=D0=B5=20=D0=BA=D0=BE=D0=BC=D0=BC?= =?UTF-8?q?=D0=B5=D0=BD=D1=82=D1=8B=20=D0=BA=D0=BE=D1=80=D1=80=D0=B5=D0=BA?= =?UTF-8?q?=D1=82=D0=BD=D0=BE=20=D1=86=D0=B5=D0=BD=D1=82=D1=80=D0=B8=D1=80?= =?UTF-8?q?=D1=83=D1=8E=D1=82=D1=81=D1=8F=20=D0=BD=D0=B0=20=D1=8D=D0=BA?= =?UTF-8?q?=D1=80=D0=B0=D0=BD=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/skin/new/js/comments.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/templates/skin/new/js/comments.js b/templates/skin/new/js/comments.js index 86f37cf1..8f9d96d7 100644 --- a/templates/skin/new/js/comments.js +++ b/templates/skin/new/js/comments.js @@ -214,8 +214,13 @@ var lsCmtTreeClass = new Class({ 'x': 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) { $('comment_content_id_'+this.iCommentIdLastView).removeClass('view'); }