mirror of
https://github.com/scratchfoundation/scratchjr.git
synced 2024-11-28 18:15:37 -05:00
set column-count by optionNum
This commit is contained in:
parent
8c5e099337
commit
3293e506ca
1 changed files with 9 additions and 0 deletions
|
@ -273,6 +273,15 @@ function indexShowQuestion (key) {
|
|||
}
|
||||
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';
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue