Applied solution for image size issues in toggle bar

This commit is contained in:
Jose Gonzalez 2020-04-01 09:25:18 +02:00
parent cba95e4423
commit faf7c5462e
1 changed files with 3 additions and 2 deletions

View File

@ -3711,8 +3711,8 @@ function ui_toggle(
// Generate unique Id. // Generate unique Id.
$uniqid = uniqid(''); $uniqid = uniqid('');
$image_a = html_print_image($img_a, true, false, true); $image_a = html_print_image($img_a, true, [ 'style' => 'object-fit: contain;' ], true);
$image_b = html_print_image($img_b, true, false, true); $image_b = html_print_image($img_b, true, [ 'style' => 'object-fit: contain;' ], true);
// Options. // Options.
if ($hidden_default) { if ($hidden_default) {
$style = 'display:none'; $style = 'display:none';
@ -3736,6 +3736,7 @@ function ui_toggle(
$original, $original,
true, true,
[ [
'style' => 'object-fit: contain;',
'title' => $title, 'title' => $title,
'id' => 'image_'.$uniqid, 'id' => 'image_'.$uniqid,
] ]