Add method for converting anchored drawing to inline
This commit is contained in:
Ilya Kirillov
2025-05-05 16:54:49 +03:00
parent 95b5484d92
commit b3ede32dfe

View File

@ -1828,7 +1828,6 @@ ParaDrawing.prototype.Get_DrawingType = function()
};
ParaDrawing.prototype.Is_Inline = function()
{
if(this.Parent &&
this.Parent.Get_ParentTextTransform &&
this.Parent.Get_ParentTextTransform())
@ -1847,12 +1846,26 @@ ParaDrawing.prototype.Is_Inline = function()
return true;
}
return ( drawing_Inline === this.DrawingType ? true : false );
return drawing_Inline === this.DrawingType;
};
ParaDrawing.prototype.IsInline = function()
{
return this.Is_Inline();
};
ParaDrawing.prototype.MakeInline = function()
{
if (drawing_Inline === this.Get_DrawingType())
return;
this.Set_DrawingType(drawing_Inline);
if (AscCommon.isRealObject(this.GraphicObj.bounds)
&& AscFormat.isRealNumber(this.GraphicObj.bounds.w)
&& AscFormat.isRealNumber(this.GraphicObj.bounds.h))
{
this.CheckWH();
}
};
ParaDrawing.prototype.IsForm = function()
{
return this.Form;