mirror of
https://github.com/ysoftdevs/pf2015.git
synced 2026-05-06 07:53:37 +02:00
fix font size for text cards
This commit is contained in:
@@ -55,7 +55,7 @@ var basicCards = {
|
||||
var mathCards = {
|
||||
'zero': {
|
||||
'arabic': '0',
|
||||
'roman': 'nulla',
|
||||
'roman': ' ',
|
||||
'math': '1-1',
|
||||
'japanese': '〇'
|
||||
},
|
||||
|
||||
@@ -332,9 +332,16 @@ angular.module('app', ['angular-flippy', 'level-selector', 'level-complete'])
|
||||
*/
|
||||
$scope.computeCardSize = function(cardsPerRow) {
|
||||
var cardSize = Math.floor(Math.min(window.innerWidth, window.innerHeight) / cardsPerRow) - 20;
|
||||
|
||||
var fontSize = Math.floor(cardSize * 0.6);
|
||||
if (fontSize < 12) {
|
||||
fontSize = 12;
|
||||
}
|
||||
|
||||
$scope.cardStyle = {
|
||||
width: cardSize + "px",
|
||||
height: cardSize + "px"
|
||||
height: cardSize + "px",
|
||||
"font-size": fontSize + "px"
|
||||
};
|
||||
|
||||
var paddingLeft = Math.floor((window.innerWidth - (cardSize + 10) * cardsPerRow) / 2);
|
||||
|
||||
Reference in New Issue
Block a user