Commit 5405cc1d authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander.Trofimov

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@50120 954022d7-b5bf-4e40-9824-e11837661b57
parent a19c5f0b
......@@ -124,6 +124,9 @@ function CEditorPage(api)
this.m_dScrollX = 0;
this.m_dScrollY_max = 1;
this.m_dScrollX_max = 1;
this.m_dScrollX_Central = 0;
this.m_dScrollY_Central = 0;
this.m_bIsRePaintOnScroll = true;
this.m_dDocumentWidth = 0;
......@@ -2366,6 +2369,12 @@ function CEditorPage(api)
var _x = -this.m_dScrollX + _centerX - _centerSlideX - _hor_width_left;
var _y = -(this.m_dScrollY - this.SlideScrollMIN) + _centerY - _centerSlideY - _ver_height_top;
// теперь расчитаем какие нужны позиции, чтобы слайд находился по центру
var _x_c = _centerX - _centerSlideX;
var _y_c = _centerY - _centerSlideY;
this.m_dScrollX_Central = _centerX - _centerSlideX - _hor_width_left - _x_c;
this.m_dScrollY_Central = this.SlideScrollMIN + _centerY - _centerSlideY - _ver_height_top - _y_c;
this.m_oDrawingDocument.SlideCurrectRect.left = _x;
this.m_oDrawingDocument.SlideCurrectRect.top = _y;
this.m_oDrawingDocument.SlideCurrectRect.right = _x + _slideW;
......@@ -2825,6 +2834,8 @@ function CEditorPage(api)
this.m_bIsUpdateHorRuler = true;
this.m_bIsUpdateVerRuler = true;
this.OnCalculatePagesPlace();
//this.m_oScrollVerApi.scrollTo(0, drDoc.SlideCurrent * this.m_dDocumentPageHeight);
if (this.IsGoToPageMAXPosition)
{
......@@ -2833,7 +2844,13 @@ function CEditorPage(api)
}
else
{
this.m_oScrollVerApi.scrollToY(this.SlideScrollMIN);
//this.m_oScrollVerApi.scrollToY(this.SlideScrollMIN);
this.m_oScrollVerApi.scrollToY(this.m_dScrollY_Central);
}
if (this.m_bIsHorScrollVisible)
{
this.m_oScrollHorApi.scrollToX(this.m_dScrollX_Central);
}
if (this.m_oApi.isViewMode === false && null != this.m_oLogicDocument)
......
......@@ -2061,7 +2061,8 @@ CGraphics.prototype =
DrawSpellingLine : function(y0, x0, x1, w)
{
this.drawHorLine(0, y0, x0, x1, w );
if (!editor.isViewMode)
this.drawHorLine(0, y0, x0, x1, w );
},
// smart methods for horizontal / vertical lines
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment