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:
Tim van der Meij 2020-02-12 23:47:02 +01:00 committed by GitHub
commit 993a1d7825
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -658,7 +658,6 @@ var renderTextLayer = (function renderTextLayerClosure() {
expand(this);
this._bounds = null;
}
const NO_PADDING = "0 0 0 0";
const transformBuf = [],
paddingBuf = [];
@ -701,10 +700,7 @@ var renderTextLayer = (function renderTextLayerClosure() {
paddingBuf.push(0);
}
const padding = paddingBuf.join(" ");
if (padding !== NO_PADDING) {
div.style.padding = padding;
}
div.style.padding = paddingBuf.join(" ");
if (transformBuf.length) {
div.style.transform = transformBuf.join(" ");
}