mirror of
https://github.com/scratchfoundation/scratchjr.git
synced 2024-11-25 00:28:20 -05:00
Merge pull request #422 from yueyuzhao/issue/420-large-count-options2
change column-count by optionNum on init options page
This commit is contained in:
commit
0be5e272a5
1 changed files with 9 additions and 0 deletions
|
@ -273,6 +273,15 @@ function indexShowQuestion (key) {
|
||||||
}
|
}
|
||||||
optionNum = optionNum + 1;
|
optionNum = optionNum + 1;
|
||||||
});
|
});
|
||||||
|
// iPad mini has the minimum screen size, it can show 13 items in one column
|
||||||
|
// and we use 3 columns as default
|
||||||
|
if (optionNum > 13 * 5) {
|
||||||
|
gn('optionsList').style['column-count'] = 8;
|
||||||
|
} else if (optionNum > 13 * 3) {
|
||||||
|
gn('optionsList').style['column-count'] = 5;
|
||||||
|
} else {
|
||||||
|
gn('optionsList').style['column-count'] = 3;
|
||||||
|
}
|
||||||
gn('optionsList').className = 'optionsList show';
|
gn('optionsList').className = 'optionsList show';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue