From 8622dccaf1a2380562284999c395592032a8f5ba Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Mon, 3 Sep 2018 21:28:40 +0200 Subject: [PATCH] Disable focus points for letterboxed media --- app/javascript/flavours/glitch/components/media_gallery.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/javascript/flavours/glitch/components/media_gallery.js b/app/javascript/flavours/glitch/components/media_gallery.js index fa27757f39..1de12c5e04 100644 --- a/app/javascript/flavours/glitch/components/media_gallery.js +++ b/app/javascript/flavours/glitch/components/media_gallery.js @@ -163,7 +163,7 @@ class Item extends React.PureComponent { sizes={sizes} alt={attachment.get('description')} title={attachment.get('description')} - style={{ objectPosition: `${x}% ${y}%` }} + style={{ objectPosition: letterbox ? null : `${x}% ${y}%` }} /> );