Commit 1b9cb0ff authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

Необходимо очищать canvas для графических объектов при scroll

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@57290 954022d7-b5bf-4e40-9824-e11837661b57
parent 0fc251c7
...@@ -5262,13 +5262,12 @@ ...@@ -5262,13 +5262,12 @@
if (moveHeight > 0) { if (moveHeight > 0) {
ctx.drawImage(ctx.getCanvas(), x, y, oldW, moveHeight, x + dx, y - dy, oldW, moveHeight); ctx.drawImage(ctx.getCanvas(), x, y, oldW, moveHeight, x + dx, y - dy, oldW, moveHeight);
this.drawingGraphicCtx.moveImageData(x, y, oldW, moveHeight, x + dx, y - dy); this.drawingGraphicCtx.moveImageData(x, y, oldW, moveHeight, x + dx, y - dy);
} else {
// Scroll на весь экран
this.drawingGraphicCtx.clear();
} }
var clearTop = y + (scrollDown ? moveHeight - dy : 0);
moveHeight = Math.abs(dy) + lastRowHeight;
ctx.setFillStyle(this.settings.cells.defaultState.background) ctx.setFillStyle(this.settings.cells.defaultState.background)
.fillRect(this.headersLeft, y + (scrollDown ? oldH - dy - lastRowHeight : 0), .fillRect(this.headersLeft, clearTop, ctxW, moveHeight);
ctxW, Math.abs(dy) + lastRowHeight); this.drawingGraphicCtx.clearRect(this.headersLeft, clearTop, ctxW, moveHeight);
if(this.objectRender && this.objectRender.drawingArea) if(this.objectRender && this.objectRender.drawingArea)
this.objectRender.drawingArea.reinitRanges(); this.objectRender.drawingArea.reinitRanges();
...@@ -5390,12 +5389,13 @@ ...@@ -5390,12 +5389,13 @@
if (moveWidth > 0) { if (moveWidth > 0) {
ctx.drawImage(ctx.getCanvas(), x, y, moveWidth, ctxH, x - dx, y, moveWidth, ctxH); ctx.drawImage(ctx.getCanvas(), x, y, moveWidth, ctxH, x - dx, y, moveWidth, ctxH);
this.drawingGraphicCtx.moveImageData(x, y, moveWidth, ctxH, x - dx, y); this.drawingGraphicCtx.moveImageData(x, y, moveWidth, ctxH, x - dx, y);
} else {
// Scroll на весь экран
this.drawingGraphicCtx.clear();
} }
var clearLeft = x + (scrollRight > 0 ? moveWidth - dx : 0);
moveWidth = Math.abs(dx) + lastColWidth;
ctx.setFillStyle(this.settings.cells.defaultState.background) ctx.setFillStyle(this.settings.cells.defaultState.background)
.fillRect(x + (scrollRight > 0 ? oldW - dx - lastColWidth : 0), y, Math.abs(dx) + lastColWidth, ctxH); .fillRect(clearLeft, y, moveWidth, ctxH);
this.drawingGraphicCtx.clearRect(clearLeft, y, moveWidth, ctxH);
if(this.objectRender && this.objectRender.drawingArea) if(this.objectRender && this.objectRender.drawingArea)
this.objectRender.drawingArea.reinitRanges(); this.objectRender.drawingArea.reinitRanges();
......
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