public $inline;
public $in_popup = false;
public $display_area;
+ public $animation_type;
public $read_mode;
public $background_color;
public $group;
$compiler->addIssue(2, ['page' => $link['page'], 'uid' => $link['uid']]);
return '';
}
+
+ public function getAnimationType()
+ {
+ return (!$this->animation_type || $this->animation_type === 'default') ? $this->compiler->getSetting('linksAnimation', 'fade') : $this->animation_type;
+ }
}
if ($this->display_area) {
if ($this->compiler->getSetting('linksAnimationLayer', 'top') === 'top' || $this->compiler->getSetting('linksAnimation', 'fade') === 'fade') {
$class[] = 'displayArea';
- $attrs .= ' data-animation="' . $this->compiler->getSetting('linksAnimation', 'fade') . '"';
+ $attrs .= ' data-animation="' . $this->getAnimationType() . '"';
} else {
$attrs .= ' data-display-area=""';
}
if ($this->blinkdelay > 0) {
$attrs .= ' data-blinkdelay="' . intval($this->blinkdelay) . '"';
}
+
return '<a href="' . $this->getURL() . '" data-type="' . $this->type . '" target="' . $this->getTarget() . '"' . $attrs . $this->getAdditionnalContent() . $this->getTrack() . '>' . $this->getInnerContent() . '</a>';
}
$init['zindex'] = 29;
$init['uid'] .= '_da';
$init['id'] .= '_da';
- $init['image_rollover'] = 'type=reveal
+ if ($this->getAnimationType() === 'highlight') {
+ $init['image_rollover'] = 'type=reveal
direction=right
ease=power1.easeOut
opacity=' . $opacity . '
ease=power1.easeOut
duration=' . $animDuration . '
delay=' . ($delay - 0.5 + $animDuration + $duration);
+ } else if ($this->getAnimationType() === 'fade') {
+ $init['image_rollover'] = 'type=fadein
+ease=power1.easeOut
+duration=' . $animDuration . '
+delay=' . $delay . '
+borderradius=' . ($this->compiler->getSetting('linksRoundedCorners', 0) * 2) . '
+---------------
+type=fadeout
+ease=power1.easeOut
+duration=' . $animDuration . '
+delay=' . ($delay - 0.5 + $animDuration + $duration);
+ } else if ($this->getAnimationType() === 'none') {
+ $init['image_rollover'] = 'type=fadeout
+ease=power1.easeOut
+duration=0
+delay=0
+borderradius=' . ($this->compiler->getSetting('linksRoundedCorners', 0) * 2);
+ }
+
return self::getInstance($init['id'], $init, $this->compiler);
}