Commit 3e0f988e 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@50744 954022d7-b5bf-4e40-9824-e11837661b57
parent 0d3261f1
...@@ -2908,6 +2908,9 @@ function DrawingObjects() { ...@@ -2908,6 +2908,9 @@ function DrawingObjects() {
overlay.Clear(); overlay.Clear();
this.drawingDocument.Overlay = overlay; this.drawingDocument.Overlay = overlay;
// Clip
_this.clipGraphicsCanvas(shapeOverlayCtx);
var bFullClear = (_this.controller.curState.id != STATES_ID_TEXT_ADD) && (_this.controller.curState.id != STATES_ID_TEXT_ADD_IN_GROUP); var bFullClear = (_this.controller.curState.id != STATES_ID_TEXT_ADD) && (_this.controller.curState.id != STATES_ID_TEXT_ADD_IN_GROUP);
if ( bFullClear ) if ( bFullClear )
...@@ -2978,6 +2981,9 @@ function DrawingObjects() { ...@@ -2978,6 +2981,9 @@ function DrawingObjects() {
} }
_this.drawWorksheetHeaders(); _this.drawWorksheetHeaders();
// Restore
_this.restoreGraphicsCanvas(shapeOverlayCtx);
return true; return true;
}; };
...@@ -3262,6 +3268,9 @@ function DrawingObjects() { ...@@ -3262,6 +3268,9 @@ function DrawingObjects() {
worksheet._drawGraphic(); worksheet._drawGraphic();
worksheet.model.Drawings = aObjects; worksheet.model.Drawings = aObjects;
// Clip
_this.clipGraphicsCanvas(shapeCtx);
for (var i = 0; i < aObjects.length; i++) { for (var i = 0; i < aObjects.length; i++) {
var index = i; var index = i;
...@@ -3300,11 +3309,14 @@ function DrawingObjects() { ...@@ -3300,11 +3309,14 @@ function DrawingObjects() {
drawingObject.graphicObject.transform.tx = tx; drawingObject.graphicObject.transform.tx = tx;
drawingObject.graphicObject.transform.ty = ty; drawingObject.graphicObject.transform.ty = ty;
} }
else else {
drawingObject.graphicObject.draw( shapeCtx ); drawingObject.graphicObject.draw( shapeCtx );
} }
} }
} }
// Restore
_this.restoreGraphicsCanvas(shapeOverlayCtx);
}
} }
if ( !printOptions ) { if ( !printOptions ) {
...@@ -3356,6 +3368,9 @@ function DrawingObjects() { ...@@ -3356,6 +3368,9 @@ function DrawingObjects() {
_this.drawWorksheetHeaders = function(bForce) { _this.drawWorksheetHeaders = function(bForce) {
// TODO Отказаться от перерисовки хидеров
return;
// Проверяем выход за видимую область // Проверяем выход за видимую область
var fvr = worksheet.getFirstVisibleRow(); var fvr = worksheet.getFirstVisibleRow();
var fvc = worksheet.getFirstVisibleCol(); var fvc = worksheet.getFirstVisibleCol();
...@@ -3394,6 +3409,25 @@ function DrawingObjects() { ...@@ -3394,6 +3409,25 @@ function DrawingObjects() {
} }
} }
_this.clipGraphicsCanvas = function(canvas) {
if ( canvas instanceof CGraphics ) {
var x = worksheet.getCellLeft(0, 0);
var y = worksheet.getCellTop(0, 0);
var w = shapeCtx.m_lWidthPix - x;
var h = shapeCtx.m_lHeightPix - y;
canvas.m_oContext.save();
canvas.m_oContext.beginPath();
canvas.m_oContext.rect(x, y, w, h);
canvas.m_oContext.clip();
}
}
_this.restoreGraphicsCanvas = function(canvas) {
if ( canvas instanceof CGraphics )
canvas.m_oContext.restore();
}
//----------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------
// For object type // For object type
//----------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------
...@@ -4342,6 +4376,8 @@ function DrawingObjects() { ...@@ -4342,6 +4376,8 @@ function DrawingObjects() {
var x = scrollOffset.getX(); var x = scrollOffset.getX();
var y = scrollOffset.getY(); var y = scrollOffset.getY();
//console.log("X: " + x + ", Y: " + y);
shapeCtx.m_oCoordTransform.tx = x; shapeCtx.m_oCoordTransform.tx = x;
shapeCtx.m_oCoordTransform.ty = y; shapeCtx.m_oCoordTransform.ty = y;
shapeCtx.CalculateFullTransform(); shapeCtx.CalculateFullTransform();
......
...@@ -1016,7 +1016,7 @@ ...@@ -1016,7 +1016,7 @@
if (isResized) if (isResized)
ws.objectRender.resizeCanvas(); ws.objectRender.resizeCanvas();
ws.objectRender.restoreScrollOffset(); ws.objectRender.setScrollOffset();
ws.draw(); ws.draw();
this._onSelectionNameChanged(ws.getSelectionName(/*bRangeText*/false)); this._onSelectionNameChanged(ws.getSelectionName(/*bRangeText*/false));
this._onWSSelectionChanged(ws.getSelectionInfo()); this._onWSSelectionChanged(ws.getSelectionInfo());
......
...@@ -1792,7 +1792,7 @@ ...@@ -1792,7 +1792,7 @@
ctx: drawingCtx, ctx: drawingCtx,
printPagesData: printPagesData printPagesData: printPagesData
}; };
this.objectRender.showDrawingObjects(false, drawingPrintOptions); this.objectRender.showDrawingObjectsEx(false, drawingPrintOptions);
this.visibleRange = tmpVisibleRange.clone(true); this.visibleRange = tmpVisibleRange.clone(true);
if (isAppBridge) {window['appBridge']['dummyCommandUpdate'] ();} if (isAppBridge) {window['appBridge']['dummyCommandUpdate'] ();}
......
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