Skip to content

Commit

Permalink
[ve] Fix SetDrawingFreeze
Browse files Browse the repository at this point in the history
  • Loading branch information
konovalovsergey committed Dec 1, 2024
1 parent 2fc3135 commit 18b56b9
Showing 1 changed file with 47 additions and 1 deletion.
48 changes: 47 additions & 1 deletion draw/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,14 @@
{
AscCommon.baseEditorsApi.call(this, config, AscCommon.c_oEditorId.Draw);

this.WordControl = null;

this.documentFormatSave = c_oAscFileType.VSDX;

this.tmpIsFreeze = null;
this.tmpZoomType = null;
this.tmpDocumentUnits = null;
this.tmpFontRenderingMode = null;
/**
*
* @type {CVisioDocument}
Expand Down Expand Up @@ -108,6 +116,41 @@
this.CreateComponents();
this.WordControl.Init();


if (AscCommon.g_oTextMeasurer.SetParams)
{
AscCommon.g_oTextMeasurer.SetParams({ mode : "slide" });
}

if (this.tmpFontRenderingMode)
{
this.SetFontRenderingMode(this.tmpFontRenderingMode);
}
if (null !== this.tmpIsFreeze)
{
this.SetDrawingFreeze(this.tmpIsFreeze);
}
if (null !== this.tmpZoomType)
{
switch (this.tmpZoomType)
{
case AscCommon.c_oZoomType.FitToPage:
this.zoomFitToPage();
break;
case AscCommon.c_oZoomType.FitToWidth:
this.zoomFitToWidth();
break;
case AscCommon.c_oZoomType.CustomMode:
this.zoomCustomMode();
break;
}
}
if (null != this.tmpDocumentUnits)
{
this.asc_SetDocumentUnits(this.tmpDocumentUnits);
this.tmpDocumentUnits = null;
}

this.asc_setViewMode(this.isViewMode);
};
asc_docs_api.prototype.CreateCSS = function()
Expand Down Expand Up @@ -546,8 +589,11 @@
};
asc_docs_api.prototype.SetDrawingFreeze = function(bIsFreeze)
{
if (!this.WordControl)
if (!this.isLoadFullApi)
{
this.tmpIsFreeze = bIsFreeze;
return;
}

this.WordControl.DrawingFreeze = bIsFreeze;

Expand Down

0 comments on commit 18b56b9

Please sign in to comment.