Skip to content
Snippets Groups Projects
Unverified Commit b170627c authored by Eugen Rochko's avatar Eugen Rochko Committed by GitHub
Browse files

Fix cover behaviour of thumbnails that are wider than taller (#6678)

parent a1b06570
No related branches found
No related tags found
No related merge requests found
......@@ -167,6 +167,14 @@ class Item extends React.PureComponent {
vShift = shiftToPoint(widthRatio, (containerHeight * (height / 100)), originalHeight, focusY, true);
}
if (originalWidth > originalHeight) {
imageStyle.height = '100%';
imageStyle.width = 'auto';
} else {
imageStyle.height = 'auto';
imageStyle.width = '100%';
}
imageStyle.top = vShift;
imageStyle.left = hShift;
} else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment