From 8c8a5626372c48e61375b58b68a6724e34e581b3 Mon Sep 17 00:00:00 2001 From: OVSharova Date: Fri, 9 Jul 2021 02:59:38 +0300 Subject: [PATCH] Edit my bug --- apps/common/main/lib/util/utils.js | 8 ++++---- apps/documenteditor/main/app/view/ParagraphSettings.js | 9 ++++++--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/apps/common/main/lib/util/utils.js b/apps/common/main/lib/util/utils.js index 776933b1f..00d202852 100644 --- a/apps/common/main/lib/util/utils.js +++ b/apps/common/main/lib/util/utils.js @@ -381,8 +381,8 @@ var metrics = new(function() { fnRecalcToMM: function(value, unit) { // value in pt/cm/inch. need to convert to mm - if(unit==undefined) - unrt=me.currentMetric + if(unit===undefined) + unit=me.currentMetric; if (value!==null && value!==undefined) { switch (unit) { case me.c_MetricUnits.cm: @@ -398,8 +398,8 @@ var metrics = new(function() { fnRecalcFromMM: function(value, unit) { // value in mm. need to convert to pt/cm/inch - if(unit==undefined) - unrt=me.currentMetric + if(unit===undefined) + unit=me.currentMetric; switch (unit) { case me.c_MetricUnits.cm: return parseFloat((value/10.).toFixed(4)); diff --git a/apps/documenteditor/main/app/view/ParagraphSettings.js b/apps/documenteditor/main/app/view/ParagraphSettings.js index 399d47419..150ca56e4 100644 --- a/apps/documenteditor/main/app/view/ParagraphSettings.js +++ b/apps/documenteditor/main/app/view/ParagraphSettings.js @@ -488,6 +488,7 @@ define([ (this._state.LeftIndent===null || left===null)&&(this._state.LeftIndent!==left)) { this.numIndentsLeft.setValue(left!==null ? Common.Utils.Metric.fnRecalcFromMM(left) : '', true); this._state.LeftIndent=left; + } if ( Math.abs(this._state.FirstLine-first)>0.001 || @@ -554,12 +555,14 @@ define([ for (var i=0; i