mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 23:46:14 -04:00
ace2_inner: Delete unnecessary currentLine
variable
This commit is contained in:
parent
9fc613d362
commit
bf10e70f2e
1 changed files with 1 additions and 3 deletions
|
@ -3543,14 +3543,13 @@ function Ace2Inner(editorInfo, cssManagers) {
|
||||||
const defaultLineHeight = parseInt(innerdocbodyStyles['line-height']);
|
const defaultLineHeight = parseInt(innerdocbodyStyles['line-height']);
|
||||||
|
|
||||||
let docLine = document.body.firstElementChild;
|
let docLine = document.body.firstElementChild;
|
||||||
let currentLine = 0;
|
|
||||||
let h = null;
|
let h = null;
|
||||||
|
|
||||||
// First loop to calculate the heights from doc body
|
// First loop to calculate the heights from doc body
|
||||||
while (docLine) {
|
while (docLine) {
|
||||||
const nextDocLine = docLine.nextElementSibling;
|
const nextDocLine = docLine.nextElementSibling;
|
||||||
if (nextDocLine) {
|
if (nextDocLine) {
|
||||||
if (currentLine === 0) {
|
if (lineOffsets.length === 0) {
|
||||||
// It's the first line. For line number alignment purposes, its
|
// It's the first line. For line number alignment purposes, its
|
||||||
// height is taken to be the top offset of the next line. If we
|
// height is taken to be the top offset of the next line. If we
|
||||||
// didn't do this special case, we would miss out on any top margin
|
// didn't do this special case, we would miss out on any top margin
|
||||||
|
@ -3582,7 +3581,6 @@ function Ace2Inner(editorInfo, cssManagers) {
|
||||||
lineHeights.push(defaultLineHeight);
|
lineHeights.push(defaultLineHeight);
|
||||||
}
|
}
|
||||||
docLine = nextDocLine;
|
docLine = nextDocLine;
|
||||||
currentLine++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let newNumLines = rep.lines.length();
|
let newNumLines = rep.lines.length();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue