[PE mobile] Bug 47200

This commit is contained in:
SergeyEzhin 2021-04-20 15:43:01 +03:00
parent 34098fc67f
commit 96dcabf069
2 changed files with 6 additions and 2 deletions

View file

@ -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));
};

View file

@ -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' ?
<span className="color-preview" style={{ background: `#${(typeof fontColor === "object" ? fontColor.color : fontColor)}`}}></span> :