From 30337a0a56d88724d8fe3c656395f9eb5df4cd64 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 11 Jan 2021 18:06:12 +0300 Subject: [PATCH] Fix changing units of measurement. Fix form settings. --- apps/documenteditor/main/app/view/FormSettings.js | 10 +++++++--- .../main/app/view/HeaderFooterSettings.js | 1 + .../documenteditor/main/app/view/ParagraphSettings.js | 6 ++++++ apps/documenteditor/main/app/view/TableSettings.js | 4 ++++ .../presentationeditor/main/app/view/ChartSettings.js | 2 ++ .../main/app/view/ParagraphSettings.js | 5 +++++ .../presentationeditor/main/app/view/TableSettings.js | 4 ++++ apps/spreadsheeteditor/main/app/view/ChartSettings.js | 2 ++ apps/spreadsheeteditor/main/app/view/ImageSettings.js | 2 ++ .../main/app/view/ParagraphSettings.js | 6 +++++- .../spreadsheeteditor/main/app/view/SlicerSettings.js | 11 +++++++++++ 11 files changed, 49 insertions(+), 4 deletions(-) diff --git a/apps/documenteditor/main/app/view/FormSettings.js b/apps/documenteditor/main/app/view/FormSettings.js index 938f6f151..f579d2789 100644 --- a/apps/documenteditor/main/app/view/FormSettings.js +++ b/apps/documenteditor/main/app/view/FormSettings.js @@ -185,6 +185,7 @@ define([ minValue: 0.1 }); this.lockedControls.push(this.spnWidth); + this.spinners.push(this.spnWidth); this.spnWidth.on('change', this.onWidthChange.bind(this)); this.spnWidth.on('inputleave', function(){ me.fireEvent('editcomplete', me);}); @@ -407,7 +408,7 @@ define([ formTextPr.put_MaxCharacters(this.spnMaxChars.getNumberValue() || 10); if (this.spnWidth.getValue()) { var value = this.spnWidth.getNumberValue(); - formTextPr.put_Width(value<=0 ? 0 : parseInt(Common.Utils.Metric.fnRecalcToMM(value) * 72 * 20 / 25.4)); + formTextPr.put_Width(value<=0 ? 0 : parseInt(Common.Utils.Metric.fnRecalcToMM(value) * 72 * 20 / 25.4 + 0.1)); } else formTextPr.put_Width(0); } @@ -423,7 +424,7 @@ define([ var formTextPr = this._originalTextFormProps || new AscCommon.CSdtTextFormPr(); if (this.spnWidth.getValue()) { var value = this.spnWidth.getNumberValue(); - formTextPr.put_Width(value<=0 ? 0 : parseInt(Common.Utils.Metric.fnRecalcToMM(value) * 72 * 20 / 25.4)); + formTextPr.put_Width(value<=0 ? 0 : parseInt(Common.Utils.Metric.fnRecalcToMM(value) * 72 * 20 / 25.4 + 0.1)); } else formTextPr.put_Width(0); @@ -783,8 +784,11 @@ define([ for (var i=0; i