From 1b636658ace022bbc230229cd10d9fde9caced59 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 17 Apr 2018 14:09:31 +0300 Subject: [PATCH] [DE] Fix fit to margin (rev. https://github.com/ONLYOFFICE/web-apps-pro/commit/b6ec334a7dc6edeb58246fc00ea53519091a0651) --- apps/documenteditor/main/app/view/ImageSettings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/documenteditor/main/app/view/ImageSettings.js b/apps/documenteditor/main/app/view/ImageSettings.js index a2aad4982..392be905e 100644 --- a/apps/documenteditor/main/app/view/ImageSettings.js +++ b/apps/documenteditor/main/app/view/ImageSettings.js @@ -318,7 +318,7 @@ define([ if (this.api) { var section = this.api.asc_GetSectionProps(), ratio = (this._state.Height>0) ? this._state.Width/this._state.Height : 1, - pagew = this.api.asc_GetCurrentColumnWidth(), + pagew = (this.api.asc_GetCurrentColumnWidth) ? this.api.asc_GetCurrentColumnWidth() : (section.get_W() - section.get_LeftMargin() - section.get_RightMargin()), pageh = section.get_H() - section.get_TopMargin() - section.get_BottomMargin(), pageratio = pagew/pageh, w, h;