Commit 19b7d96d authored by SergeyLuzyanin's avatar SergeyLuzyanin

CheckContentControlEditingLock, CheckContentControlEditingLock

parent faa16119
......@@ -783,6 +783,16 @@
{
};
CGraphicObjectBase.prototype.CheckContentControlEditingLock = function () {
if(this.group){
this.group.CheckContentControlEditingLock();
return;
}
if(this.parent && this.parent.CheckContentControlEditingLock){
this.parent.CheckContentControlEditingLock();
}
};
window['AscFormat'] = window['AscFormat'] || {};
window['AscFormat'].CGraphicObjectBase = CGraphicObjectBase;
window['AscFormat'].CGraphicBounds = CGraphicBounds;
......
......@@ -231,6 +231,7 @@ if(typeof CGraphicObjects !== "undefined")
CGraphicObjects.prototype.documentIsSelectionLocked = function(CheckType)
{
var oDrawing, i;
var bDelete = (AscCommon.changestype_Delete === CheckType || AscCommon.changestype_Remove === CheckType);
if(AscCommon.changestype_Drawing_Props === CheckType
|| AscCommon.changestype_Image_Properties === CheckType
|| AscCommon.changestype_Delete === CheckType
......@@ -242,6 +243,10 @@ if(typeof CGraphicObjects !== "undefined")
for(i = 0; i < this.selectedObjects.length; ++i)
{
oDrawing = this.selectedObjects[i].parent;
if(bDelete)
{
oDrawing.CheckContentControlDeletingLock();
}
oDrawing.Lock.Check(oDrawing.Get_Id());
}
}
......
......@@ -2479,6 +2479,19 @@ ParaDrawing.prototype.GetAllContentControls = function(arrContentControls)
};
ParaDrawing.prototype.CheckContentControlEditingLock = function(){
if(this.DocumentContent && this.DocumentContent.CheckContentControlEditingLock){
this.DocumentContent.CheckContentControlEditingLock();
}
};
ParaDrawing.prototype.CheckContentControlDeletingLock = function(){
if(this.DocumentContent && this.DocumentContent.CheckContentControlDeletingLock){
this.DocumentContent.CheckContentControlDeletingLock();
}
};
/**
* Класс, описывающий текущее положение параграфа при рассчете позиции автофигуры.
* @constructor
......
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