]> cat aescling's git repositories - mastodon.git/commitdiff
Fix size of single media in media-gallery (#5098)
authorLynx Kotoura <admin@sanin.link>
Mon, 25 Sep 2017 18:26:50 +0000 (03:26 +0900)
committerEugen Rochko <eugen@zeonfederated.com>
Mon, 25 Sep 2017 18:26:50 +0000 (20:26 +0200)
app/javascript/mastodon/components/media_gallery.js

index 52b34971b4ec5e2c236833511db5ebb4bb3651f1..a81409871e75dde9b76aa38ea9c5e64f1c10b39b 100644 (file)
@@ -161,10 +161,8 @@ class Item extends React.PureComponent {
       );
     }
 
-    const style = standalone ? {} : { left, top, right, bottom, width: `${width}%`, height: `${height}%` };
-
     return (
-      <div className={classNames('media-gallery__item', { standalone })} key={attachment.get('id')} style={style}>
+      <div className={classNames('media-gallery__item', { standalone })} key={attachment.get('id')} style={{ left: left, top: top, right: right, bottom: bottom, width: `${width}%`, height: `${height}%` }}>
         {thumbnail}
       </div>
     );