Skip to content

Commit

Permalink
fix(funbox): layoutfluid not working correctly in some cases or with …
Browse files Browse the repository at this point in the history
…2 layouts
  • Loading branch information
Miodec committed Oct 2, 2023
1 parent 73aca5b commit d56850f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions frontend/src/ts/test/funbox/funbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down

0 comments on commit d56850f

Please sign in to comment.