Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
okaufman committed Sep 3, 2024
1 parent bcb9ff8 commit 9b57d25
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions classes/class.ilOpencastPageComponentPluginGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -525,20 +525,24 @@ protected function setStyleFromProps(ilTemplate $tpl, array $properties)
$tpl->setVariable('RATIO', $ratio);
$tpl->setVariable('MAX-WIDTH', $properties[self::PROP_WIDTH]);
$tpl->setVariable('MAX-HEIGHT', $properties[self::PROP_HEIGHT]);
if ($properties[self::PROP_RESPONSIVE] != false) {
$tpl->setVariable('WIDTH', 'width:100%;');
if (array_key_exists(self::PROP_RESPONSIVE, $properties)) {
if ($properties[self::PROP_RESPONSIVE] != false) {
$tpl->setVariable('WIDTH', 'width:100%;');
}
}
switch ($properties[self::PROP_POSITION]) {
case self::POSITION_CENTER:
$tpl->setVariable('CONTAINER_STYLE', 'text-align:center;');
break;
case self::POSITION_RIGHT:
$tpl->setVariable('CONTAINER_STYLE', 'text-align:right;');
break;
case self::POSITION_LEFT:
default:
$tpl->setVariable('CONTAINER_STYLE', 'text-align:left;');
break;
if (array_key_exists(self::PROP_POSITION, $properties)) {
switch ($properties[self::PROP_POSITION]) {
case self::POSITION_CENTER:
$tpl->setVariable('CONTAINER_STYLE', 'text-align:center;');
break;
case self::POSITION_RIGHT:
$tpl->setVariable('CONTAINER_STYLE', 'text-align:right;');
break;
case self::POSITION_LEFT:
default:
$tpl->setVariable('CONTAINER_STYLE', 'text-align:left;');
break;
}
}
}

Expand Down

0 comments on commit 9b57d25

Please sign in to comment.