Commit 2bc86d04 authored by Sergey Luzyanin's avatar Sergey Luzyanin

fixed problems with presentation's content changes

parent c8031e90
......@@ -383,6 +383,33 @@
return true;
};
CChangesDrawingsContentPresentation.prototype.Load = function(Color)
{
var aContent = this.private_GetChangedArray();
if(!Array.isArray(aContent)){
return;
}
if(this.IsAdd()){
if (this.PosArray.length <= 0 || this.Items.length <= 0)
return;
for (var nIndex = 0, nCount = this.Items.length; nIndex < nCount; ++nIndex){
var Pos = this.Class.m_oContentChanges.Check(AscCommon.contentchanges_Add, true !== this.UseArray ? this.Pos + nIndex : this.PosArray[nIndex]);
var Element = this.Items[nIndex];
Pos = Math.min(Pos, aContent.length);
aContent.splice(Pos, 0, Element);
}
}
else{
for (var nIndex = 0, nCount = this.Items.length; nIndex < nCount; ++nIndex) {
var Pos = this.Class.m_oContentChanges.Check(AscCommon.contentchanges_Remove, true !== this.UseArray ? this.Pos : this.PosArray[nIndex]);
if (false === Pos)
continue;
aContent.splice(Pos, 1);
}
}
};
window['AscDFH'].CChangesDrawingsContentPresentation = CChangesDrawingsContentPresentation;
function CChangesDrawingsContentNoId(Class, Type, Pos, Items, isAdd){
......
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