From 96dcabf0692f8ec0c2a50ed99eb03b2c625c442d Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Tue, 20 Apr 2021 15:43:01 +0300 Subject: [PATCH] [PE mobile] Bug 47200 --- .../mobile/src/controller/edit/EditText.jsx | 4 ++++ apps/presentationeditor/mobile/src/view/edit/EditText.jsx | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/presentationeditor/mobile/src/controller/edit/EditText.jsx b/apps/presentationeditor/mobile/src/controller/edit/EditText.jsx index 01ddd0801..02adafcb8 100644 --- a/apps/presentationeditor/mobile/src/controller/edit/EditText.jsx +++ b/apps/presentationeditor/mobile/src/controller/edit/EditText.jsx @@ -100,6 +100,8 @@ class EditTextController extends Component { newDistance = (distance < 0) ? 0 : Math.min(maxValue, distance + step); } + newDistance = parseFloat(newDistance.toFixed(2)); + api.put_LineSpacingBeforeAfter(0, (newDistance < 0) ? -1 : Common.Utils.Metric.fnRecalcToMM(newDistance)); }; @@ -122,6 +124,8 @@ class EditTextController extends Component { newDistance = (distance < 0) ? 0 : Math.min(maxValue, distance + step); } + newDistance = parseFloat(newDistance.toFixed(2)); + api.put_LineSpacingBeforeAfter(1, (newDistance < 0) ? -1 : Common.Utils.Metric.fnRecalcToMM(newDistance)); }; diff --git a/apps/presentationeditor/mobile/src/view/edit/EditText.jsx b/apps/presentationeditor/mobile/src/view/edit/EditText.jsx index 5d8b636f8..e434fabd1 100644 --- a/apps/presentationeditor/mobile/src/view/edit/EditText.jsx +++ b/apps/presentationeditor/mobile/src/view/edit/EditText.jsx @@ -33,8 +33,8 @@ const EditText = props => { spaceAfter = paragraphObj.get_Spacing().get_After() < 0 ? paragraphObj.get_Spacing().get_After() : Common.Utils.Metric.fnRecalcFromMM(paragraphObj.get_Spacing().get_After()); } - const displayBefore = spaceBefore && spaceBefore < 0 ? _t.textAuto : spaceBefore + ' ' + metricText; - const displayAfter = spaceAfter && spaceAfter < 0 ? _t.textAuto : spaceAfter + ' ' + metricText; + const displayBefore = spaceBefore && spaceBefore < 0 ? _t.textAuto : parseFloat(spaceBefore.toFixed(2)) + ' ' + metricText; + const displayAfter = spaceAfter && spaceAfter < 0 ? _t.textAuto : parseFloat(spaceAfter.toFixed(2)) + ' ' + metricText; const fontColorPreview = fontColor !== 'auto' ? :