Skip to content

Commit

Permalink
tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
smmercuri committed Nov 9, 2023
1 parent d6fd22a commit 43f66eb
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions stack/cas/castext2/blocks/parsons.block.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,10 @@ public function compile($format, $options): ? MP_Node {
unset($xpars['overridecss']);
}

// Set default width and height here, we want to push forward to overwrite the iframe defaults
$width = "100%";
$height = "400px";
if (array_key_exists('width', $xpars)) {
$width = $xpars['width'];
}
if (array_key_exists('height', $xpars)) {
$height = $xpars['height'];
}
// Set default width and height here, we want to push forward to overwrite the iframe defaults
// if they are not provided in the block parameters
$width = array_key_exists('width', $xpars) ? $xpars['width'] : "100%";
$height = array_key_exists('height', $xpars) ? $xpars['height'] : "400px";
$xpars['width'] = $width;
$xpars['height'] = $height;

Expand Down

0 comments on commit 43f66eb

Please sign in to comment.