From 4122a837fadf8cf59712b5c1790ac0af96bcbc84 Mon Sep 17 00:00:00 2001 From: Sorin Davidoi Date: Sun, 9 Jul 2017 18:49:07 +0200 Subject: [PATCH] fix(components/media_modal): Aspect ratio (#4128) * fix(components/media_modal): Aspect ratio * fix: Remove useless style --- app/javascript/mastodon/features/ui/components/image_loader.js | 1 + app/javascript/mastodon/features/ui/components/media_modal.js | 2 +- app/javascript/styles/components.scss | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/javascript/mastodon/features/ui/components/image_loader.js b/app/javascript/mastodon/features/ui/components/image_loader.js index 5ea55d1d26..aad594380e 100644 --- a/app/javascript/mastodon/features/ui/components/image_loader.js +++ b/app/javascript/mastodon/features/ui/components/image_loader.js @@ -133,6 +133,7 @@ export default class ImageLoader extends React.PureComponent { width={width} height={height} ref={this.setCanvasRef} + style={{ opacity: loading ? 1 : 0 }} /> {!loading && ( diff --git a/app/javascript/mastodon/features/ui/components/media_modal.js b/app/javascript/mastodon/features/ui/components/media_modal.js index 769e188202..23f588669f 100644 --- a/app/javascript/mastodon/features/ui/components/media_modal.js +++ b/app/javascript/mastodon/features/ui/components/media_modal.js @@ -94,7 +94,7 @@ export default class MediaModal extends ImmutablePureComponent {
- + {content}
diff --git a/app/javascript/styles/components.scss b/app/javascript/styles/components.scss index 397126ec1d..97651b5f46 100644 --- a/app/javascript/styles/components.scss +++ b/app/javascript/styles/components.scss @@ -2935,6 +2935,7 @@ button.icon-button.active i.fa-retweet { canvas { display: block; background: url('../images/void.png') repeat; + object-fit: contain; } }