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

Пересчет диаграмм при изменениии данных на листе. Селект текста в заголовках.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@56623 954022d7-b5bf-4e40-9824-e11837661b57
parent d1a8f4ab
...@@ -4308,8 +4308,15 @@ function DrawingObjects() { ...@@ -4308,8 +4308,15 @@ function DrawingObjects() {
} }
}; };
_this.rebuildChartGraphicObjects = function(data) { _this.rebuildChartGraphicObjects = function(data)
{
for(var i = 0; i < aObjects.length; ++i)
{
if(aObjects[i].graphicObject.getObjectType() === historyitem_type_ChartSpace)
{
aObjects[i].graphicObject.rebuildSeries();
}
}
}; };
_this.updateDrawingObject = function(bInsert, operType, updateRange) { _this.updateDrawingObject = function(bInsert, operType, updateRange) {
...@@ -5333,7 +5340,7 @@ function DrawingObjects() { ...@@ -5333,7 +5340,7 @@ function DrawingObjects() {
// } // }
// } // }
if($("#chartPropsMenuDiv").length > 0) //TODO: убрать как будет всё готово в меню /*if($("#chartPropsMenuDiv").length > 0) //TODO: убрать как будет всё готово в меню
{ {
var chart = _this.controller.getAscChartObject(); var chart = _this.controller.getAscChartObject();
if ( !chart ) { if ( !chart ) {
...@@ -5383,7 +5390,7 @@ function DrawingObjects() { ...@@ -5383,7 +5390,7 @@ function DrawingObjects() {
}(); }();
} }
return chart; return chart;
} } */
var settings = _this.controller.getChartProps(); var settings = _this.controller.getChartProps();
if ( !settings ) if ( !settings )
......
This diff is collapsed.
...@@ -227,6 +227,11 @@ function handleChart(drawing, drawingObjectsController, e, x, y, group, pageInde ...@@ -227,6 +227,11 @@ function handleChart(drawing, drawingObjectsController, e, x, y, group, pageInde
} }
} }
if(drawing.chart.legend)
{
}
ret = handleShapeImage(drawing, drawingObjectsController, e, x, y, group, pageIndex, bWord); ret = handleShapeImage(drawing, drawingObjectsController, e, x, y, group, pageIndex, bWord);
if(ret) if(ret)
return ret; return ret;
......
...@@ -12,6 +12,16 @@ function findPrAndRemove(arr, pr) ...@@ -12,6 +12,16 @@ function findPrAndRemove(arr, pr)
} }
} }
function removePtsFromLit(lit)
{
var i;
var start_idx = Array.isArray(lit.pts) ? lit.pts.length - 1 : (Array.isArray(lit.pt) ? lit.pt.length - 1 : -1);
for(i = start_idx; i > -1; --i)
{
lit.removeDPt(i);
}
}
function removeDPtsFromSeries(series) function removeDPtsFromSeries(series)
{ {
...@@ -13571,6 +13581,15 @@ CNumLit.prototype = ...@@ -13571,6 +13581,15 @@ CNumLit.prototype =
{}, {},
removeDPt: function(idx)
{
if(this.pts[idx])
{
History.Add(this, {Type: historyitem_CommonLit_RemoveDPt, idx: idx, pt: this.pts[idx]});
this.pts.splice(idx, 1);
}
},
createDuplicate: function() createDuplicate: function()
{ {
var c = new CNumLit(); var c = new CNumLit();
...@@ -13654,6 +13673,12 @@ CNumLit.prototype = ...@@ -13654,6 +13673,12 @@ CNumLit.prototype =
this.ptCount = data.oldPr; this.ptCount = data.oldPr;
break; break;
} }
case historyitem_CommonLit_RemoveDPt:
{
this.pts.splice(data.idx, 0, data.pt);
break;
}
} }
}, },
...@@ -13678,6 +13703,11 @@ CNumLit.prototype = ...@@ -13678,6 +13703,11 @@ CNumLit.prototype =
this.ptCount = data.newPr; this.ptCount = data.newPr;
break; break;
} }
case historyitem_CommonLit_RemoveDPt:
{
this.pts.splice(data.idx, 1);
break;
}
} }
}, },
...@@ -13703,6 +13733,12 @@ CNumLit.prototype = ...@@ -13703,6 +13733,12 @@ CNumLit.prototype =
writeLong(w, data.newPr); writeLong(w, data.newPr);
break; break;
} }
case historyitem_CommonLit_RemoveDPt:
{
w.WriteLong(data.idx);
break;
}
} }
}, },
...@@ -13732,6 +13768,12 @@ CNumLit.prototype = ...@@ -13732,6 +13768,12 @@ CNumLit.prototype =
this.ptCount = readLong(r); this.ptCount = readLong(r);
break; break;
} }
case historyitem_CommonLit_RemoveDPt:
{
var idx = r.GetLong();
this.pts.splice(idx, 1);
break;
}
} }
} }
}; };
...@@ -17580,6 +17622,16 @@ CStrCache.prototype = ...@@ -17580,6 +17622,16 @@ CStrCache.prototype =
Refresh_RecalcData: function() Refresh_RecalcData: function()
{}, {},
removeDPt: function(idx)
{
if(this.pt[idx])
{
History.Add(this, {Type: historyitem_CommonLit_RemoveDPt, idx: idx, pt: this.pt[idx]});
this.pt.splice(idx, 1);
}
},
createDuplicate: function() createDuplicate: function()
{ {
var c = new CStrCache(); var c = new CStrCache();
...@@ -17650,6 +17702,11 @@ CStrCache.prototype = ...@@ -17650,6 +17702,11 @@ CStrCache.prototype =
this.ptCount = data.oldPr; this.ptCount = data.oldPr;
break; break;
} }
case historyitem_CommonLit_RemoveDPt:
{
this.pt.splice(data.idx, 0, data.pt);
break;
}
} }
}, },
...@@ -17667,6 +17724,11 @@ CStrCache.prototype = ...@@ -17667,6 +17724,11 @@ CStrCache.prototype =
this.ptCount = data.newPr; this.ptCount = data.newPr;
break; break;
} }
case historyitem_CommonLit_RemoveDPt:
{
this.pt.splice(data.idx, 1);
break;
}
} }
}, },
...@@ -17685,6 +17747,11 @@ CStrCache.prototype = ...@@ -17685,6 +17747,11 @@ CStrCache.prototype =
writeLong(w, data.newPr); writeLong(w, data.newPr);
break; break;
} }
case historyitem_CommonLit_RemoveDPt:
{
w.WriteLong(data.idx);
break;
}
} }
}, },
...@@ -17707,6 +17774,13 @@ CStrCache.prototype = ...@@ -17707,6 +17774,13 @@ CStrCache.prototype =
this.ptCount = readLong(r); this.ptCount = readLong(r);
break; break;
} }
case historyitem_CommonLit_RemoveDPt:
{
var idx = r.GetLong();
this.pt.splice(idx, 1);
break;
}
} }
} }
}; };
......
This diff is collapsed.
...@@ -6,6 +6,7 @@ var historyitem_AutoShapes_AddToDrawingObjects = 3; ...@@ -6,6 +6,7 @@ var historyitem_AutoShapes_AddToDrawingObjects = 3;
var historyitem_AutoShapes_RemoveFromDrawingObjects = 4; var historyitem_AutoShapes_RemoveFromDrawingObjects = 4;
var historyitem_CommonChart_RemoveSeries = 5; var historyitem_CommonChart_RemoveSeries = 5;
var historyitem_CommonSeries_RemoveDPt = 6; var historyitem_CommonSeries_RemoveDPt = 6;
var historyitem_CommonLit_RemoveDPt = 6;
var historyitem_ColorMod_SetName = 2001; var historyitem_ColorMod_SetName = 2001;
var historyitem_ColorMod_SetVal = 2002; var historyitem_ColorMod_SetVal = 2002;
var historyitem_ColorModifiers_AddColorMod = 2003; var historyitem_ColorModifiers_AddColorMod = 2003;
......
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