Commit 57ab4c5f authored by Dmitry.Vikulov's avatar Dmitry.Vikulov Committed by Alexander.Trofimov

Ускорение отрисовки при скроле

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@49472 954022d7-b5bf-4e40-9824-e11837661b57
parent 3f139e2e
...@@ -2468,12 +2468,16 @@ function DrawingObjects() { ...@@ -2468,12 +2468,16 @@ function DrawingObjects() {
} }
// Проверяет выход за границы // Проверяет выход за границы
_t.canDraw = function() { _t.inVisibleArea = function() {
var result = true; var result = true;
if ( (_t.worksheet.getCellLeft(_t.worksheet.getFirstVisibleCol(), 0) > _t.worksheet.getCellLeft(_t.to.col, 0) + mmToPx(_t.to.colOff)) || var fvc = _t.worksheet.getFirstVisibleCol();
(_t.worksheet.getCellTop(_t.worksheet.getFirstVisibleRow(), 0) > _t.worksheet.getCellTop(_t.to.row, 0) + mmToPx(_t.to.rowOff))) var fvr = _t.worksheet.getFirstVisibleRow();
{ result = false; } var lvc = _t.worksheet.getLastVisibleCol();
var lvr = _t.worksheet.getLastVisibleRow();
if ( (fvr > _t.to.row + 1) || (lvr < _t.from.row - 1) || (fvc > _t.to.col + 1) || (lvc < _t.from.col - 1) )
result = false;
return result; return result;
} }
...@@ -3037,6 +3041,8 @@ function DrawingObjects() { ...@@ -3037,6 +3041,8 @@ function DrawingObjects() {
// Чистим текущие области // Чистим текущие области
for ( var i = 0; i < aObjects.length; i++ ) { for ( var i = 0; i < aObjects.length; i++ ) {
if ( !aObjects[i].inVisibleArea() )
continue;
var boundsChecker = _this.getBoundsChecker(aObjects[i]); var boundsChecker = _this.getBoundsChecker(aObjects[i]);
restoreSheetArea(boundsChecker); restoreSheetArea(boundsChecker);
aBoundsCheckers.push(boundsChecker); aBoundsCheckers.push(boundsChecker);
...@@ -3128,7 +3134,7 @@ function DrawingObjects() { ...@@ -3128,7 +3134,7 @@ function DrawingObjects() {
var index = i; var index = i;
var obj = aObjects[i]; var obj = aObjects[i];
if ( !obj.canDraw() ) if ( !obj.inVisibleArea() )
continue; continue;
if ( !obj.flags.anchorUpdated ) if ( !obj.flags.anchorUpdated )
......
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