Commit e5053c27 authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

Переделал функцию clear для объектов. fix bug #26633

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@60195 954022d7-b5bf-4e40-9824-e11837661b57
parent dde642a6
......@@ -517,47 +517,6 @@ function FrozenPlace(ws, type) {
canvas.m_oContext.restore();
};
_this.clear = function(isOverlay) {
var rect = _this.getRect2();
var x = convertMetrics(rect.x, 0, 1);
var y = convertMetrics(rect.y, 0, 1);
var w = convertMetrics(rect.w, 0, 1);
var h = convertMetrics(rect.h, 0, 1);
var deltaH = 0, deltaW = 0;
switch (_this.type)
{
case FrozenAreaType.Top:
case FrozenAreaType.Center:
case FrozenAreaType.LeftTop:
case FrozenAreaType.Left:
{
deltaH = _this.worksheet.getCellTop(0, 1);
deltaW = _this.worksheet.getCellLeft(0,1);
break;
}
case FrozenAreaType.LeftBottom:
case FrozenAreaType.Bottom:
{
deltaW = _this.worksheet.getCellLeft(0,1);
break;
}
case FrozenAreaType.Right:
case FrozenAreaType.RightTop:
{
deltaH = _this.worksheet.getCellTop(0,1);
break;
}
}
if ( isOverlay )
_this.worksheet.overlayGraphicCtx.clearRect( x - deltaW, y - deltaH, w + deltaW, h + deltaH );
else {
_this.worksheet.drawingGraphicCtx.clearRect( x - deltaW, y - deltaH, w + deltaW, h + deltaH );
}
};
_this.drawObject = function(object) {
var canvas = _this.worksheet.objectRender.getDrawingCanvas();
_this.setTransform(canvas.shapeCtx, canvas.shapeOverlayCtx, canvas.autoShapeTrack);
......@@ -722,9 +681,7 @@ function DrawingArea(ws) {
};
_this.clear = function() {
for ( var i = 0; i < _this.frozenPlaces.length; i++ ) {
_this.frozenPlaces[i].clear();
}
_this.worksheet.drawingGraphicCtx.clear();
};
_this.drawObject = function(object) {
......@@ -842,7 +799,4 @@ function DrawingArea(ws) {
}
return null !== cell ? cell : new CCellObjectInfo();
};
_this.calculateCoords = function(cell) {
};
}
\ No newline at end of file
......@@ -2346,7 +2346,7 @@ function DrawingObjects() {
height = areaHeight;
width /= metricCoeff;
}
var cellTo = _this.drawingArea.calculateCell(realLeftOffset + width, realTopOffset + height);
object.to.col = cellTo.col;
object.to.colOff = cellTo.colOff;
......
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