Skip to content

Commit

Permalink
Fixed #767: Fix for responsiveness of flashCards breaks new themes
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Reijnders committed May 28, 2018
1 parent ed0f727 commit 8a4c276
Showing 1 changed file with 13 additions and 0 deletions.
Expand Up @@ -41,6 +41,19 @@
$pageContents.add('.card, #cards').css({ 'width': '', 'height': '' });
$('.cardInner').css('height', '');
$('.card, #cards').css('max-width', '');

// Check whether boxshadow is set, if not reset the values from NaN to something more sensible;
if ($pageContents.data('boxShadow').top !== $pageContents.data('boxShadow').top
|| $pageContents.data('boxShadow').bottom !== $pageContents.data('boxShadow').bottom
|| $pageContents.data('boxShadow').left !== $pageContents.data('boxShadow').left
|| $pageContents.data('boxShadow').right !== $pageContents.data('boxShadow').right)
{
// $pageContents.data('boxShadow').top is NaN
$pageContents.data('boxShadow').top = 0;
$pageContents.data('boxShadow').bottom = 0;
$pageContents.data('boxShadow').left = 0;
$pageContents.data('boxShadow').right = 0;
}

// ...then recalculate the best sizes...
$pageContents
Expand Down

0 comments on commit 8a4c276

Please sign in to comment.