$init = ArrayUtil::asArray($init);
static::normalizeDimensions($init);
+ static::normalizeArea($init);
$init['scorm'] = static::isScorm($init);
$init['to'] = static::replaceCustomURL($init['to']);
}
}
+ public static function normalizeArea(&$a)
+ {
+ if (!isset($a['display_area'])) {
+ $a['display_area'] = 'fill';
+ }
+ if ($a['display_area'] == '0' || !$a['display_area']) {
+ $a['display_area'] = 'none';
+ }
+ if ($a['display_area'] == '1') {
+ $a['display_area'] = 'fill';
+ }
+
+ if (!isset($a['animate_area'])) {
+ $a['animate_area'] = 'default';
+ }
+ }
+
public function getSurface()
{
return $this->width * $this->height;
{
$class = $this->getClasses();
$attrs = '';
- if ($this->display_area) {
- if ($this->compiler->getSetting('linksAnimationLayer', 'top') === 'top' || $this->compiler->getSetting('linksAnimation', 'fade') === 'fade') {
- $class[] = 'displayArea';
- $attrs .= ' data-animation="' . $this->getAnimationType() . '"';
- } else {
- $attrs .= ' data-display-area=""';
- }
+ if ($this->compiler->getSetting('linksAnimationLayer', 'top') === 'top') {
+ $attrs .= ' data-animation="' . $this->getAnimationType() . '"';
+ $attrs .= ' data-display-area="' . $this->display_area . '" ';
+ } else {
+ $attrs .= ' data-display-area="none" ';
}
+
if (count($class)) {
$attrs .= ' class="' . implode(' ', $class) . '"';
}