mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
$thumbheigt was calculated instead of $thumbwidth
This commit is contained in:
parent
ef9b262c7c
commit
db8a7ac9d1
1 changed files with 1 additions and 1 deletions
|
@ -217,7 +217,7 @@ class data_field_picture extends data_field_file {
|
||||||
if ($thumbwidth && !$thumbheight) {
|
if ($thumbwidth && !$thumbheight) {
|
||||||
$thumbheight = $image->height * $thumbwidth / $image->width;
|
$thumbheight = $image->height * $thumbwidth / $image->width;
|
||||||
} else if($thumbheight && !$thumbwidth) {
|
} else if($thumbheight && !$thumbwidth) {
|
||||||
$thumbheight = $image->width * $thumbheight / $image->height;
|
$thumbwidth = $image->width * $thumbheight / $image->height;
|
||||||
} else { // BOTH are set - may need to crop if aspect ratio differs
|
} else { // BOTH are set - may need to crop if aspect ratio differs
|
||||||
$hratio = $image->height / $thumbheight;
|
$hratio = $image->height / $thumbheight;
|
||||||
$wratio = $image->width / $thumbwidth;
|
$wratio = $image->width / $thumbwidth;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue