45 $this->dirs = array(
"width",
"height");
55 $this->width = $a_width;
75 $this->height = $a_height;
95 $this->constrainproportions = $a_constrainproportions;
105 return $this->constrainproportions;
117 foreach ($this->dirs as
$dir)
153 $tpl =
new ilTemplate(
"tpl.prop_width_height.html",
true,
true,
"Services/MediaObjects");
155 foreach ($this->dirs as
$dir)
159 case "width":
$value = strtolower(trim($this->
getWidth()));
break;
162 $tpl->setVariable(
"VAL_".strtoupper($dir),
$value);
166 $tpl->setVariable(
"CHECKED",
'checked="checked"');
170 $tpl->setVariable(
"TXT_CONSTR_PROP", $lng->txt(
"cont_constrain_proportions"));
176 $tpl->setVariable(
"WH_RATIO", round($wh_ratio, 6));
178 $a_tpl->setCurrentBlock(
"prop_generic");
179 $a_tpl->setVariable(
"PROP_GENERIC",
$tpl->get());
180 $a_tpl->parseCurrentBlock();
182 $GLOBALS[
"tpl"]->addJavascript(
"./Services/MediaObjects/js/ServiceMediaObjectPropWidthHeight.js");