Commit ffa152ab authored by Dmitry.Vikulov's avatar Dmitry.Vikulov Committed by Alexander.Trofimov

- Превью для чартов при первом обращении к объекту

- Перестроение чартов при действиях с ячейками, влияющими на данные

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@49381 954022d7-b5bf-4e40-9824-e11837661b57
parent c46d0afb
......@@ -265,7 +265,7 @@ asc_CChart.prototype = {
seria.Val.NumCache = [ createItem(3), createItem(6) ];
seria.OutlineColor = uniColors[2];
seria.TxCache.Formula = "Sheet1!C1";
seria.TxCache.Tx = api.chartTranslate.series + " 2";
seria.TxCache.Tx = api.chartTranslate.series + " 3";
this.series.push(seria);
},
......@@ -522,10 +522,10 @@ asc_CChart.prototype = {
}
for ( var i = 0; i < colors.length; i++ ) {
var rgbColor = new RGBColor(colors[i]);
var uniColor = CreateUniColorRGB(rgbColor.r, rgbColor.g, rgbColor.b);
uniColors.push(uniColor);
}
return uniColors;
},
......@@ -686,8 +686,8 @@ asc_CChart.prototype = {
for (var i = 0; i < seriesCount; i++) {
var seria = new asc_CChartSeria();
seria.Val.Formula = Reader.GetString2();
seria.Val.Formula = Reader.GetString2();
var numCacheCount = Reader.GetLong();
for (var j = 0; j < numCacheCount; j++) {
var item = {};
......
......@@ -784,11 +784,6 @@ DrawingObjectsController.prototype =
}
if(c_obj.isChart())
{
/*if ( !api.chartStyleManager.isReady() )
api.chartStyleManager.init();
if ( !api.chartPreviewManager.isReady() )
api.chartPreviewManager.init();*/
if(!isRealObject(chart_props))
{
chart_props = new asc_CImgProperty();
......@@ -900,11 +895,6 @@ DrawingObjectsController.prototype =
}
if (c_obj.isChart())
{
/*if ( !api.chartStyleManager.isReady() )
api.chartStyleManager.init();
if ( !api.chartPreviewManager.isReady() )
api.chartPreviewManager.init();*/
if (!isRealObject(chart_props))
{
chart_props = new asc_CImgProperty();
......@@ -1009,6 +999,12 @@ DrawingObjectsController.prototype =
}
for (var i = 0; i < ret.length; i++) {
if ( (!api.chartStyleManager.isReady() || !api.chartPreviewManager.isReady()) && ret[i].ChartProperties ) {
api.chartStyleManager.init();
api.chartPreviewManager.init();
this.drawingObjects.callTrigger("asc_onUpdateChartStyles");
}
ascSelectedObjects.push(new asc_CSelectedObject( c_oAscTypeSelectElement.Image, new asc_CImgProperty(ret[i]) ));
}
......
......@@ -8102,6 +8102,7 @@
if (isUpdateCols) { t._updateVisibleColsCount(); }
if (isUpdateRows) { t._updateVisibleRowsCount(); }
t.objectRender.rebuildChartGraphicObjects();
t.objectRender.showDrawingObjects(true);
};
......
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