Commit 8bfd4a49 authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

add getContextWidth and getContextHeight

remove use jquery

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@56753 954022d7-b5bf-4e40-9824-e11837661b57
parent 1fe914ac
......@@ -3352,6 +3352,13 @@ function DrawingObjects() {
return worksheet;
};
_this.getContextWidth = function () {
return drawingCtx.getWidth();
};
_this.getContextHeight = function () {
return drawingCtx.getHeight();
};
_this.getWorksheetModel = function() {
return worksheet.model;
};
......
......@@ -340,8 +340,8 @@ DrawingObjectsController.prototype.addChartDrawingObject = function(asc_chart, o
chart.setStyle(2);
chart.setBDeleted(false);
this.resetSelection();
var chartLeft = this.drawingObjects.convertMetric(options && options.left ? ptToPx(options.left) : (parseInt($("#ws-canvas").css('width')) / 2) - c_oAscChartDefines.defaultChartWidth / 2, 0, 3);
var chartTop = this.drawingObjects.convertMetric(options && options.top ? ptToPx(options.top) : (parseInt($("#ws-canvas").css('height')) / 2) - c_oAscChartDefines.defaultChartHeight / 2, 0, 3);
var chartLeft = this.drawingObjects.convertMetric(options && options.left ? options.left : (this.drawingObjects.getContextWidth() / 2) - c_oAscChartDefines.defaultChartWidth / 2, 1, 3);
var chartTop = this.drawingObjects.convertMetric(options && options.top ? options.top : (this.drawingObjects.getContextHeight() / 2) - c_oAscChartDefines.defaultChartHeight / 2, 1, 3);
var w, h;
if(isRealObject(options) && isRealNumber(options.width) && isRealNumber(options.height))
{
......
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