define(["require", "exports", "../../common/utils/export", "../../common/model/constants"], function (require, exports, export_1, constants_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Export3D = (function () {
function Export3D(chart) {
this.chart = chart;
}
Export3D.prototype.export = function (type, fileName) {
var exportChart = new export_1.ExportUtils(this.chart);
var argsData = {
cancel: false, width: null, height: null
};
this.chart.trigger(constants_1.beforeExport, argsData);
if (!argsData.cancel) {
exportChart.export(type, fileName, undefined, [this.chart]);
}
};
Export3D.prototype.pdfExport = function (fileName, orientation, controls, width, height, isVertical, header, footer, exportToMultiplePage) {
var exportChart = new export_1.ExportUtils(this.chart);
controls = controls ? controls : [this.chart];
var argsData = {
cancel: false, width: width, height: height
};
this.chart.trigger(constants_1.beforeExport, argsData);
if (!argsData.cancel) {
exportChart.export('PDF', fileName, orientation, controls, width = argsData.width, height = argsData.height, isVertical, header, footer, exportToMultiplePage);
}
};
Export3D.prototype.getDataUrl = function (chart) {
var exportUtil = new export_1.ExportUtils(chart);
return exportUtil.getDataUrl(chart);
};
Export3D.prototype.getModuleName = function () {
return 'Export3D';
};
Export3D.prototype.destroy = function () {
};
return Export3D;
}());
exports.Export3D = Export3D;
});
|