mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2026-01-04 06:24:07 +08:00
fix(tape mode): indicate typos: below being cut off
This commit is contained in:
parent
0750f26a99
commit
9a4ac30957
1 changed files with 8 additions and 3 deletions
|
|
@ -578,9 +578,14 @@ export function updateWordsWrapperHeight(force = false): void {
|
|||
//limit to 3 lines
|
||||
wrapperEl.style.height = wrapperHeight + "px";
|
||||
} else {
|
||||
//show 3 lines if tape mode is on and has newlines, otherwise 1
|
||||
const linesToShow = TestWords.hasNewline ? 3 : 1;
|
||||
wrapperEl.style.height = wordHeight * linesToShow + "px";
|
||||
//show 3 lines if tape mode is on and has newlines, otherwise use words height (because of indicate typos: below)
|
||||
if (TestWords.hasNewline) {
|
||||
wrapperEl.style.height = wordHeight * 3 + "px";
|
||||
} else {
|
||||
const wordsHeight =
|
||||
document.getElementById("words")?.offsetHeight ?? wordHeight;
|
||||
wrapperEl.style.height = wordsHeight + "px";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue