Merge pull request #11586 from Snuffleupagus/expandTextDivs-padding
[TextLayer] Immediately set the padding, rather than checking if it's empty, in `expandTextDivs`
This commit is contained in:
commit
993a1d7825
@ -658,7 +658,6 @@ var renderTextLayer = (function renderTextLayerClosure() {
|
|||||||
expand(this);
|
expand(this);
|
||||||
this._bounds = null;
|
this._bounds = null;
|
||||||
}
|
}
|
||||||
const NO_PADDING = "0 0 0 0";
|
|
||||||
const transformBuf = [],
|
const transformBuf = [],
|
||||||
paddingBuf = [];
|
paddingBuf = [];
|
||||||
|
|
||||||
@ -701,10 +700,7 @@ var renderTextLayer = (function renderTextLayerClosure() {
|
|||||||
paddingBuf.push(0);
|
paddingBuf.push(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
const padding = paddingBuf.join(" ");
|
div.style.padding = paddingBuf.join(" ");
|
||||||
if (padding !== NO_PADDING) {
|
|
||||||
div.style.padding = padding;
|
|
||||||
}
|
|
||||||
if (transformBuf.length) {
|
if (transformBuf.length) {
|
||||||
div.style.transform = transformBuf.join(" ");
|
div.style.transform = transformBuf.join(" ");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user