mirror of
https://github.com/ysoftdevs/pf2015.git
synced 2026-03-25 10:32:41 +01:00
fix game for small screens
This commit is contained in:
@@ -292,6 +292,10 @@ 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;
|
||||
|
||||
if (cardSize < 14) {
|
||||
cardSize = 14;
|
||||
}
|
||||
|
||||
var fontSize = Math.floor(cardSize * 0.6);
|
||||
if (fontSize < 12) {
|
||||
fontSize = 12;
|
||||
|
||||
Reference in New Issue
Block a user