about summary refs log tree commit diff
path: root/app/javascript
diff options
context:
space:
mode:
authorLynx Kotoura <admin@sanin.link>2017-09-26 03:26:50 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-09-25 20:26:50 +0200
commit259181c41a5b6d4654e4e956490a3e4120bc9920 (patch)
treebbec2e98e0111f390f950fa3e1d8265a0acda2b9 /app/javascript
parent510df0ac556377f6dcd2f7e3e6237ef6035f06d6 (diff)
Fix size of single media in media-gallery (#5098)
Diffstat (limited to 'app/javascript')
-rw-r--r--app/javascript/mastodon/components/media_gallery.js4
1 files changed, 1 insertions, 3 deletions
diff --git a/app/javascript/mastodon/components/media_gallery.js b/app/javascript/mastodon/components/media_gallery.js
index 52b34971b..a81409871 100644
--- a/app/javascript/mastodon/components/media_gallery.js
+++ b/app/javascript/mastodon/components/media_gallery.js
@@ -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>
     );