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

Обернул создание ChartSapce в ExecuteNoHistory

parent fe5617ad
...@@ -318,6 +318,7 @@ function CSparklineView() ...@@ -318,6 +318,7 @@ function CSparklineView()
} }
CSparklineView.prototype.initFromSparkline = function(oSparkline, oSparklineGroup, worksheetView) CSparklineView.prototype.initFromSparkline = function(oSparkline, oSparklineGroup, worksheetView)
{ {
ExecuteNoHistory(function(){
this.ws = worksheetView; this.ws = worksheetView;
var settings = new asc_ChartSettings(); var settings = new asc_ChartSettings();
switch(oSparklineGroup.type) switch(oSparklineGroup.type)
...@@ -338,7 +339,6 @@ CSparklineView.prototype.initFromSparkline = function(oSparkline, oSparklineGrou ...@@ -338,7 +339,6 @@ CSparklineView.prototype.initFromSparkline = function(oSparkline, oSparklineGrou
break; break;
} }
} }
var ser = new asc_CChartSeria(); var ser = new asc_CChartSeria();
ser.Val.Formula = oSparkline.f; ser.Val.Formula = oSparkline.f;
var chartSeries = {series: [ser], parsedHeaders: {bLeft: false, bTop: false}}; var chartSeries = {series: [ser], parsedHeaders: {bLeft: false, bTop: false}};
...@@ -356,6 +356,7 @@ CSparklineView.prototype.initFromSparkline = function(oSparkline, oSparklineGrou ...@@ -356,6 +356,7 @@ CSparklineView.prototype.initFromSparkline = function(oSparkline, oSparklineGrou
this.chartSpace.spPr.xfrm.setExtX(this.extX); this.chartSpace.spPr.xfrm.setExtX(this.extX);
this.chartSpace.spPr.xfrm.setExtY(this.extY); this.chartSpace.spPr.xfrm.setExtY(this.extY);
this.chartSpace.recalculate(); this.chartSpace.recalculate();
}, this, []);
}; };
CSparklineView.prototype.draw = function(graphics) CSparklineView.prototype.draw = function(graphics)
...@@ -366,14 +367,17 @@ CSparklineView.prototype.draw = function(graphics) ...@@ -366,14 +367,17 @@ CSparklineView.prototype.draw = function(graphics)
var extY = this.ws.getRowHeight(this.row, 3); var extY = this.ws.getRowHeight(this.row, 3);
if(Math.abs(this.extX - extX) > 0.01 || Math.abs(this.extY - extY) > 0.01) if(Math.abs(this.extX - extX) > 0.01 || Math.abs(this.extY - extY) > 0.01)
{ {
ExecuteNoHistory(function(){
this.chartSpace.spPr.xfrm.setExtX(extX); this.chartSpace.spPr.xfrm.setExtX(extX);
this.chartSpace.spPr.xfrm.setExtY(extY); this.chartSpace.spPr.xfrm.setExtY(extY);
}, this, []);
this.extX = extX; this.extX = extX;
this.extY = extY; this.extY = extY;
this.chartSpace.recalculate(); this.chartSpace.recalculate();
} }
graphics.m_oCoordTransform.tx = x; graphics.m_oCoordTransform.tx = x;
graphics.m_oCoordTransform.ty = y; graphics.m_oCoordTransform.ty = y;
this.chartSpace.draw(graphics);
}; };
//----------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------
......
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