Commit 7b5b648e authored by Sergey.Luzyanin's avatar Sergey.Luzyanin Committed by Alexander.Trofimov

Баг с нулевыми размерами диаграммы

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@57227 954022d7-b5bf-4e40-9824-e11837661b57
parent 3b71b436
...@@ -1376,13 +1376,33 @@ function DrawingObjects() { ...@@ -1376,13 +1376,33 @@ function DrawingObjects() {
var _t = this; var _t = this;
var metrics = { x: 0, y: 0, extX: 0, extY: 0 }; var metrics = { x: 0, y: 0, extX: 0, extY: 0 };
var coordsFrom = _this.coordsManager.calculateCoords(_t.from); var coordsFrom, coordsTo;
switch(_t.Type)
{
case c_oAscCellAnchorType.cellanchorOneCell:
case c_oAscCellAnchorType.cellanchorAbsolute:
{
coordsFrom = _this.coordsManager.calculateCoords(_t.from);
metrics.x = pxToMm( coordsFrom.x );
metrics.y = pxToMm( coordsFrom.y );
metrics.extX = this.ext.cx;
metrics.extY = this.ext.cy;
break;
}
case c_oAscCellAnchorType.cellanchorTwoCell:
{
coordsFrom = _this.coordsManager.calculateCoords(_t.from);
metrics.x = pxToMm( coordsFrom.x ); metrics.x = pxToMm( coordsFrom.x );
metrics.y = pxToMm( coordsFrom.y ); metrics.y = pxToMm( coordsFrom.y );
var coordsTo = _this.coordsManager.calculateCoords(_t.to); coordsTo = _this.coordsManager.calculateCoords(_t.to);
metrics.extX = pxToMm( coordsTo.x - coordsFrom.x ); metrics.extX = pxToMm( coordsTo.x - coordsFrom.x );
metrics.extY = pxToMm( coordsTo.y - coordsFrom.y ); metrics.extY = pxToMm( coordsTo.y - coordsFrom.y );
break;
}
}
return metrics; return metrics;
}; };
......
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