Fix Bug 47163

This commit is contained in:
Julia Radzhabova 2020-11-02 19:14:32 +03:00
parent 537a3e2817
commit dabc31a8c7
2 changed files with 8 additions and 8 deletions

View file

@ -132,8 +132,8 @@ define([
_paragraphObject.get_SmallCaps() && $inputTextCaps.val(['small']).prop('prevValue', 'small');
_paragraphObject.get_AllCaps() && $inputTextCaps.val(['all']).prop('prevValue', 'all');
_fontInfo.letterSpacing = Common.Utils.Metric.fnRecalcFromMM(_paragraphObject.get_TextSpacing());
$('#letter-spacing .item-after label').text(_fontInfo.letterSpacing + ' ' + Common.Utils.Metric.getCurrentMetricName());
_fontInfo.letterSpacing = (_paragraphObject.get_TextSpacing()===null || _paragraphObject.get_TextSpacing()===undefined) ? _paragraphObject.get_TextSpacing() : Common.Utils.Metric.fnRecalcFromMM(_paragraphObject.get_TextSpacing());
$('#letter-spacing .item-after label').text((_fontInfo.letterSpacing===null || _fontInfo.letterSpacing===undefined) ? '' : _fontInfo.letterSpacing + ' ' + Common.Utils.Metric.getCurrentMetricName());
}
},
@ -327,9 +327,9 @@ define([
spacing = _fontInfo.letterSpacing;
if ($button.hasClass('decrement')) {
spacing = Math.max(-100, --spacing);
spacing = (spacing===null || spacing===undefined) ? 0 : Math.max(-100, --spacing);
} else {
spacing = Math.min(100, ++spacing);
spacing = (spacing===null || spacing===undefined) ? 0 : Math.min(100, ++spacing);
}
_fontInfo.letterSpacing = spacing;

View file

@ -146,8 +146,8 @@ define([
_paragraphObject.get_SmallCaps() && $inputTextCaps.val(['small']).prop('prevValue', 'small');
_paragraphObject.get_AllCaps() && $inputTextCaps.val(['all']).prop('prevValue', 'all');
_fontInfo.letterSpacing = Common.Utils.Metric.fnRecalcFromMM(_paragraphObject.get_TextSpacing());
$('#letter-spacing .item-after label').text(_fontInfo.letterSpacing + ' ' + Common.Utils.Metric.getCurrentMetricName());
_fontInfo.letterSpacing = (_paragraphObject.get_TextSpacing()===null || _paragraphObject.get_TextSpacing()===undefined) ? _paragraphObject.get_TextSpacing() : Common.Utils.Metric.fnRecalcFromMM(_paragraphObject.get_TextSpacing());
$('#letter-spacing .item-after label').text((_fontInfo.letterSpacing===null || _fontInfo.letterSpacing===undefined) ? '' : _fontInfo.letterSpacing + ' ' + Common.Utils.Metric.getCurrentMetricName());
}
_paragraphInfo.spaceBefore = _paragraphObject.get_Spacing().get_Before() < 0 ? _paragraphObject.get_Spacing().get_Before() : Common.Utils.Metric.fnRecalcFromMM(_paragraphObject.get_Spacing().get_Before());
@ -304,9 +304,9 @@ define([
spacing = _fontInfo.letterSpacing;
if ($button.hasClass('decrement')) {
spacing = Math.max(-100, --spacing);
spacing = (spacing===null || spacing===undefined) ? 0 : Math.max(-100, --spacing);
} else {
spacing = Math.min(100, ++spacing);
spacing = (spacing===null || spacing===undefined) ? 0 : Math.min(100, ++spacing);
}
_fontInfo.letterSpacing = spacing;