mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
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
1 changed files with 1 additions and 5 deletions
|
@ -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(" ");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue