mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-22 16:36:15 -04:00
ace2_inner: Simplify iteration over line number divs
This commit is contained in:
parent
b238d9610a
commit
3237f8d123
1 changed files with 4 additions and 9 deletions
|
@ -3603,15 +3603,10 @@ function Ace2Inner(editorInfo, cssManagers) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let sidebarLine = sideDivInner.firstChild;
|
for (const [i, sideDivLine] of Array.prototype.entries.call(sideDivInner.children)) {
|
||||||
currentLine = 0;
|
if (lineOffsets[i] == null) continue;
|
||||||
while (sidebarLine && currentLine <= sideDivInner.children.length) {
|
sideDivLine.style.height = `${lineOffsets[i]}px`;
|
||||||
if (lineOffsets[currentLine] != null) {
|
sideDivLine.style.lineHeight = `${lineHeights[i]}px`;
|
||||||
sidebarLine.style.height = `${lineOffsets[currentLine]}px`;
|
|
||||||
sidebarLine.style.lineHeight = `${lineHeights[currentLine]}px`;
|
|
||||||
}
|
|
||||||
sidebarLine = sidebarLine.nextSibling;
|
|
||||||
currentLine++;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue