Fix Bug 47163
This commit is contained in:
parent
537a3e2817
commit
dabc31a8c7
|
@ -132,8 +132,8 @@ define([
|
||||||
_paragraphObject.get_SmallCaps() && $inputTextCaps.val(['small']).prop('prevValue', 'small');
|
_paragraphObject.get_SmallCaps() && $inputTextCaps.val(['small']).prop('prevValue', 'small');
|
||||||
_paragraphObject.get_AllCaps() && $inputTextCaps.val(['all']).prop('prevValue', 'all');
|
_paragraphObject.get_AllCaps() && $inputTextCaps.val(['all']).prop('prevValue', 'all');
|
||||||
|
|
||||||
_fontInfo.letterSpacing = Common.Utils.Metric.fnRecalcFromMM(_paragraphObject.get_TextSpacing());
|
_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 + ' ' + Common.Utils.Metric.getCurrentMetricName());
|
$('#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;
|
spacing = _fontInfo.letterSpacing;
|
||||||
|
|
||||||
if ($button.hasClass('decrement')) {
|
if ($button.hasClass('decrement')) {
|
||||||
spacing = Math.max(-100, --spacing);
|
spacing = (spacing===null || spacing===undefined) ? 0 : Math.max(-100, --spacing);
|
||||||
} else {
|
} else {
|
||||||
spacing = Math.min(100, ++spacing);
|
spacing = (spacing===null || spacing===undefined) ? 0 : Math.min(100, ++spacing);
|
||||||
}
|
}
|
||||||
_fontInfo.letterSpacing = spacing;
|
_fontInfo.letterSpacing = spacing;
|
||||||
|
|
||||||
|
|
|
@ -146,8 +146,8 @@ define([
|
||||||
_paragraphObject.get_SmallCaps() && $inputTextCaps.val(['small']).prop('prevValue', 'small');
|
_paragraphObject.get_SmallCaps() && $inputTextCaps.val(['small']).prop('prevValue', 'small');
|
||||||
_paragraphObject.get_AllCaps() && $inputTextCaps.val(['all']).prop('prevValue', 'all');
|
_paragraphObject.get_AllCaps() && $inputTextCaps.val(['all']).prop('prevValue', 'all');
|
||||||
|
|
||||||
_fontInfo.letterSpacing = Common.Utils.Metric.fnRecalcFromMM(_paragraphObject.get_TextSpacing());
|
_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 + ' ' + Common.Utils.Metric.getCurrentMetricName());
|
$('#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());
|
_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;
|
spacing = _fontInfo.letterSpacing;
|
||||||
|
|
||||||
if ($button.hasClass('decrement')) {
|
if ($button.hasClass('decrement')) {
|
||||||
spacing = Math.max(-100, --spacing);
|
spacing = (spacing===null || spacing===undefined) ? 0 : Math.max(-100, --spacing);
|
||||||
} else {
|
} else {
|
||||||
spacing = Math.min(100, ++spacing);
|
spacing = (spacing===null || spacing===undefined) ? 0 : Math.min(100, ++spacing);
|
||||||
}
|
}
|
||||||
_fontInfo.letterSpacing = spacing;
|
_fontInfo.letterSpacing = spacing;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue