Merge pull request #11091 from Snuffleupagus/textLayer-expandTextDivs-valid-padding
[TextLayer] Only handle positive padding values in `expandTextDivs`
This commit is contained in:
commit
d1ef08e147
@ -643,21 +643,21 @@ var renderTextLayer = (function renderTextLayerClosure() {
|
||||
if (divProps.angle !== 0) {
|
||||
transform = `rotate(${divProps.angle}deg) ${transform}`;
|
||||
}
|
||||
if (divProps.paddingLeft !== 0) {
|
||||
if (divProps.paddingLeft > 0) {
|
||||
padding +=
|
||||
` padding-left: ${divProps.paddingLeft / divProps.scale}px;`;
|
||||
transform +=
|
||||
` translateX(${-divProps.paddingLeft / divProps.scale}px)`;
|
||||
}
|
||||
if (divProps.paddingTop !== 0) {
|
||||
if (divProps.paddingTop > 0) {
|
||||
padding += ` padding-top: ${divProps.paddingTop}px;`;
|
||||
transform += ` translateY(${-divProps.paddingTop}px)`;
|
||||
}
|
||||
if (divProps.paddingRight !== 0) {
|
||||
if (divProps.paddingRight > 0) {
|
||||
padding +=
|
||||
` padding-right: ${divProps.paddingRight / divProps.scale}px;`;
|
||||
}
|
||||
if (divProps.paddingBottom !== 0) {
|
||||
if (divProps.paddingBottom > 0) {
|
||||
padding += ` padding-bottom: ${divProps.paddingBottom}px;`;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user