mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-27 16:24:41 +08:00
fix(funbox): layoutfluid not working correctly in some cases or with 2 layouts
This commit is contained in:
parent
73aca5b570
commit
d56850fc24
1 changed files with 4 additions and 5 deletions
|
@ -259,13 +259,12 @@ FunboxList.setFunboxFunctions("layoutfluid", {
|
|||
const mod =
|
||||
wordsPerLayout - ((TestWords.words.currentIndex + 1) % wordsPerLayout);
|
||||
|
||||
console.log(wordsPerLayout);
|
||||
console.log(mod);
|
||||
|
||||
if (layouts[index + 1]) {
|
||||
if (mod <= 3) {
|
||||
if (layouts[index]) {
|
||||
if (mod <= 3 && layouts[index + 1]) {
|
||||
LayoutfluidFunboxTimer.show();
|
||||
LayoutfluidFunboxTimer.updateWords(mod, layouts[index + 1]);
|
||||
} else {
|
||||
LayoutfluidFunboxTimer.hide();
|
||||
}
|
||||
if (mod === wordsPerLayout) {
|
||||
UpdateConfig.setLayout(layouts[index]);
|
||||
|
|
Loading…
Reference in a new issue