1
0
Fork 0
mirror of https://github.com/mastodon/mastodon.git synced 2024-08-20 21:08:15 -07:00

Fix size of single media in media-gallery (#5098)

This commit is contained in:
Lynx Kotoura 2017-09-26 03:26:50 +09:00 committed by Eugen Rochko
parent 510df0ac55
commit 259181c41a

View 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>
);