]> cat aescling's git repositories - mastodon.git/commitdiff
Fix thumbnail not filling entire space sometimes (#6709)
authorEugen Rochko <eugen@zeonfederated.com>
Fri, 9 Mar 2018 10:33:05 +0000 (11:33 +0100)
committerGitHub <noreply@github.com>
Fri, 9 Mar 2018 10:33:05 +0000 (11:33 +0100)
app/javascript/mastodon/components/media_gallery.js

index 71436500af06499922ab6648aa837f6b22dc42c7..9310e7c963b10de5f1ea8b9f0b29f10ebdc13e4d 100644 (file)
@@ -168,11 +168,13 @@ class Item extends React.PureComponent {
         }
 
         if (originalWidth > originalHeight) {
-          imageStyle.height = '100%';
-          imageStyle.width  = 'auto';
+          imageStyle.height   = '100%';
+          imageStyle.width    = 'auto';
+          imageStyle.minWidth = '100%';
         } else {
-          imageStyle.height = 'auto';
-          imageStyle.width  = '100%';
+          imageStyle.height    = 'auto';
+          imageStyle.width     = '100%';
+          imageStyle.minHeight = '100%';
         }
 
         imageStyle.top  = vShift;