Commit 22bddfee authored by Oleg.Korshul's avatar Oleg.Korshul

баг горизонтального скролла

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@60042 954022d7-b5bf-4e40-9824-e11837661b57
parent c49a1e5a
...@@ -5017,6 +5017,9 @@ function CSlideDrawer() ...@@ -5017,6 +5017,9 @@ function CSlideDrawer()
this.bIsEmptyPresentation = false; this.bIsEmptyPresentation = false;
this.IsRecalculateSlide = false; this.IsRecalculateSlide = false;
// TODO: максимальная ширина всех линий и запас под локи
this.SlideEps = 20;
this.CheckSlide = function(slideNum) this.CheckSlide = function(slideNum)
{ {
this.bIsEmptyPresentation = false; this.bIsEmptyPresentation = false;
...@@ -5052,8 +5055,8 @@ function CSlideDrawer() ...@@ -5052,8 +5055,8 @@ function CSlideDrawer()
this.m_oWordControl.CheckCalculateDocumentSize(this.BoundsChecker.Bounds); this.m_oWordControl.CheckCalculateDocumentSize(this.BoundsChecker.Bounds);
// теперь смотрим, используем ли кэш для скролла // теперь смотрим, используем ли кэш для скролла
var _need_pix_width = this.BoundsChecker.Bounds.max_x - this.BoundsChecker.Bounds.min_x + 1; var _need_pix_width = this.BoundsChecker.Bounds.max_x - this.BoundsChecker.Bounds.min_x + 1 + 2 * this.SlideEps;
var _need_pix_height = this.BoundsChecker.Bounds.max_y - this.BoundsChecker.Bounds.min_y + 1; var _need_pix_height = this.BoundsChecker.Bounds.max_y - this.BoundsChecker.Bounds.min_y + 1 + 2 * this.SlideEps;
this.IsCached = false; this.IsCached = false;
if (4 *_need_pix_width * _need_pix_height < this.CONST_MAX_SLIDE_CACHE_SIZE) if (4 *_need_pix_width * _need_pix_height < this.CONST_MAX_SLIDE_CACHE_SIZE)
...@@ -5097,8 +5100,8 @@ function CSlideDrawer() ...@@ -5097,8 +5100,8 @@ function CSlideDrawer()
if (this.m_oWordControl.bIsRetinaSupport) if (this.m_oWordControl.bIsRetinaSupport)
g.IsRetina = true; g.IsRetina = true;
g.m_oCoordTransform.tx = -this.BoundsChecker.Bounds.min_x; g.m_oCoordTransform.tx = -this.BoundsChecker.Bounds.min_x + this.SlideEps;
g.m_oCoordTransform.ty = -this.BoundsChecker.Bounds.min_y; g.m_oCoordTransform.ty = -this.BoundsChecker.Bounds.min_y + this.SlideEps;
g.transform(1,0,0,1,0,0); g.transform(1,0,0,1,0,0);
if (this.m_oWordControl.m_oApi.isViewMode) if (this.m_oWordControl.m_oApi.isViewMode)
...@@ -5148,10 +5151,10 @@ function CSlideDrawer() ...@@ -5148,10 +5151,10 @@ function CSlideDrawer()
if (this.IsCached) if (this.IsCached)
{ {
var w_px = _bounds.max_x - _bounds.min_x + 1; var w_px = _bounds.max_x - _bounds.min_x + 1 + 2 * this.SlideEps;
var h_px = _bounds.max_y - _bounds.min_y + 1; var h_px = _bounds.max_y - _bounds.min_y + 1 + 2 * this.SlideEps;
outputCtx.drawImage(this.CachedCanvas, 0, 0, w_px >> 0, h_px >> 0, _x >> 0, _y >> 0, w_px >> 0, h_px >> 0); outputCtx.drawImage(this.CachedCanvas, 0, 0, w_px >> 0, h_px >> 0, (_x >> 0) - this.SlideEps, (_y >> 0) - this.SlideEps, w_px >> 0, h_px >> 0);
} }
else else
{ {
......
...@@ -2148,7 +2148,7 @@ function CEditorPage(api) ...@@ -2148,7 +2148,7 @@ function CEditorPage(api)
if (this.m_bIsHorScrollVisible) if (this.m_bIsHorScrollVisible)
{ {
if (this.m_oScrollHor_) if (this.m_oScrollHor_)
this.m_oScrollHor_.Repos(settings);//unbind("scrollhorizontal") this.m_oScrollHor_.Repos(settings, true, undefined);//unbind("scrollhorizontal")
else { else {
this.m_oScrollHor_ = new ScrollObject( "id_horizontal_scroll",settings); this.m_oScrollHor_ = new ScrollObject( "id_horizontal_scroll",settings);
this.m_oScrollHor_.bind("scrollhorizontal",function(evt){ this.m_oScrollHor_.bind("scrollhorizontal",function(evt){
......
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