mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-12-18 12:41:54 +03:00
Skip check aspect ratio if > 1 media
This commit is contained in:
parent
25b98d477f
commit
e19dcf7558
2 changed files with 3 additions and 1 deletions
|
@ -74,6 +74,7 @@ function Media({
|
||||||
showCaption,
|
showCaption,
|
||||||
allowLongerCaption,
|
allowLongerCaption,
|
||||||
altIndex,
|
altIndex,
|
||||||
|
checkAspectRatio = true,
|
||||||
onClick = () => {},
|
onClick = () => {},
|
||||||
}) {
|
}) {
|
||||||
let {
|
let {
|
||||||
|
@ -354,7 +355,7 @@ function Media({
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check natural aspect ratio vs display aspect ratio
|
// Check natural aspect ratio vs display aspect ratio
|
||||||
if ($media) {
|
if (checkAspectRatio && $media) {
|
||||||
const {
|
const {
|
||||||
clientWidth,
|
clientWidth,
|
||||||
clientHeight,
|
clientHeight,
|
||||||
|
|
|
@ -2220,6 +2220,7 @@ function Status({
|
||||||
}
|
}
|
||||||
: undefined
|
: undefined
|
||||||
}
|
}
|
||||||
|
checkAspectRatio={mediaAttachments.length === 1}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue