mirror of
https://github.com/HandBrake/HandBrake-docs.git
synced 2025-12-15 14:05:26 -06:00
featherlight js: Handle very wide aspect images
This commit is contained in:
parent
6941c1f602
commit
d11b1917dc
@ -247,8 +247,8 @@ $(document).ready(function(){
|
|||||||
if (ratio > 1) {
|
if (ratio > 1) {
|
||||||
/* Round ratio down so height calc works */
|
/* Round ratio down so height calc works */
|
||||||
ratio = h / Math.floor(h / ratio);
|
ratio = h / Math.floor(h / ratio);
|
||||||
/* Account for caption size */
|
/* Account for caption size, except short images */
|
||||||
if (height + (caption_height * 2) > parent_height){
|
if (height > 300 && height + (caption_height * 2) > parent_height){
|
||||||
caption_factor = caption_factor - (caption_height * 2.5 / parent_height);
|
caption_factor = caption_factor - (caption_height * 2.5 / parent_height);
|
||||||
}
|
}
|
||||||
new_width = w * caption_factor / ratio;
|
new_width = w * caption_factor / ratio;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user