Commit 7fdbf064 authored by Sergey.Luzyanin's avatar Sergey.Luzyanin

отключение истории и таблицы id при генерации preview диаграмм, чтобы не...

отключение истории и таблицы id при генерации preview диаграмм, чтобы не добавлялись лишние объекты.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@58643 954022d7-b5bf-4e40-9824-e11837661b57
parent 77c3a635
...@@ -364,42 +364,45 @@ ChartPreviewManager.prototype.clearPreviews = function() ...@@ -364,42 +364,45 @@ ChartPreviewManager.prototype.clearPreviews = function()
this.previewGroups.length = 0; this.previewGroups.length = 0;
}; };
ChartPreviewManager.prototype.createChartPreview = function(type, styleIndex) { ChartPreviewManager.prototype.createChartPreview = function(type, styleIndex) {
if(!this.chartsByTypes[type]) return ExecuteNoHistory(function(){
this.chartsByTypes[type] = this.getChartByType(type); if(!this.chartsByTypes[type])
var chart_space = this.chartsByTypes[type]; this.chartsByTypes[type] = this.getChartByType(type);
if(chart_space.style !== styleIndex) var chart_space = this.chartsByTypes[type];
{ if(chart_space.style !== styleIndex)
chart_space.style = styleIndex; {
chart_space.recalculateMarkers(); chart_space.style = styleIndex;
chart_space.recalculateSeriesColors(); chart_space.recalculateMarkers();
chart_space.recalculatePlotAreaChartBrush(); chart_space.recalculateSeriesColors();
chart_space.recalculatePlotAreaChartPen(); chart_space.recalculatePlotAreaChartBrush();
chart_space.recalculateChartBrush(); chart_space.recalculatePlotAreaChartPen();
chart_space.recalculateChartPen(); chart_space.recalculateChartBrush();
chart_space.recalculateUpDownBars(); chart_space.recalculateChartPen();
} chart_space.recalculateUpDownBars();
chart_space.recalculatePenBrush(); }
chart_space.recalculatePenBrush();
if (null === this._canvas_charts) { if (null === this._canvas_charts) {
this._canvas_charts = document.createElement('canvas'); this._canvas_charts = document.createElement('canvas');
this._canvas_charts.width = this.CHART_PREVIEW_WIDTH_PIX; this._canvas_charts.width = this.CHART_PREVIEW_WIDTH_PIX;
this._canvas_charts.height = this.CHART_PREVIEW_HEIGHT_PIX; this._canvas_charts.height = this.CHART_PREVIEW_HEIGHT_PIX;
if (AscBrowser.isRetina) { if (AscBrowser.isRetina) {
this._canvas_charts.width <<= 1; this._canvas_charts.width <<= 1;
this._canvas_charts.height <<= 1; this._canvas_charts.height <<= 1;
} }
} }
var _canvas = this._canvas_charts;
var ctx = _canvas.getContext('2d');
var graphics = new CGraphics();
graphics.init(ctx, _canvas.width, _canvas.height, 50, 50);
graphics.m_oFontManager = g_fontManager;
graphics.transform(1,0,0,1,0,0);
chart_space.draw(graphics);
return _canvas.toDataURL("image/png");
}, this, []);
var _canvas = this._canvas_charts;
var ctx = _canvas.getContext('2d');
var graphics = new CGraphics();
graphics.init(ctx, _canvas.width, _canvas.height, 50, 50);
graphics.m_oFontManager = g_fontManager;
graphics.transform(1,0,0,1,0,0);
chart_space.draw(graphics);
return _canvas.toDataURL("image/png");
}; };
ChartPreviewManager.prototype.getChartPreviews = function(chartType) { ChartPreviewManager.prototype.getChartPreviews = function(chartType) {
......
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