public $forceTexture = false;
public $parallax = 0;
- protected $contentInlineStyles='';
+ protected $contentInlineStyles = '';
public function getHTMLContainerClass()
{
if ($s = $this->_isZoomedIn($animations)) {
$res .= ' data-animation-zoomed-in="' . $s['scale'] . '" ';
}
+ if ($s = $this->_isScaledIn($animations)) {
+ $res .= ' data-animation-zoomed-in="' . $s['scale'] . '" ';
+ }
if ($s = $this->_isZoomedOut($animations)) {
$scale = $s['scale'] ?? 1;
$res .= ' data-animation-zoomed-out="' . $scale . '" data-animation-zoomed-origin="' . $to . '" ';
$this->contentInlineStyles .= 'transform:scale(' . $scale . ');transform-origin:' . $to . ';';
}
+
+ if ($s = $this->_isScaledOut($animations)) {
+ $scale = $s['scale'] ?? 1;
+ $to = $s['transformOrigin'] ?? '50% 50%';
+ $res .= ' data-animation-zoomed-out="' . $scale . '" data-animation-zoomed-origin="' . $to . '" ';
+ $this->inlineStyles .= 'transform:scale(' . $scale . ');transform-origin:' . $to . ';';
+ }
}
if ($this->parallax != 0) {
protected function _isZoomedIn($animations)
{
- return $this->_hasAnimation($animations, ['zoomin', 'scaleto'], ['scale', 'transformOrigin']);
+ return $this->_hasAnimation($animations, ['zoomin'], ['scale', 'transformOrigin']);
+ }
+
+ protected function _isScaledIn($animations)
+ {
+ return $this->_hasAnimation($animations, ['scale'], ['scale', 'transformOrigin']);
}
protected function _isZoomedOut($animations)
{
- return $this->_hasAnimation($animations, ['zoomout', 'scalefrom'], ['scale', 'transformOrigin']);
+ return $this->_hasAnimation($animations, ['zoomout'], ['scale', 'transformOrigin']);
}
+ protected function _isScaledOut($animations)
+ {
+ return $this->_hasAnimation($animations, ['scalefrom'], ['scale', 'transformOrigin']);
+ }
+
+
protected function _isFinallyHidden($animations)
{
return $this->_hasAnimation($animations, ['fadeout', 'unmask']);
protected static $_encryptedTypes = [14, 15, 35, 39];
protected static $_encryptedAttributes = ['image_rollover'];
+ protected $inlineStyles = '';
+
/**
*
* @var CompilerInterface
}
$attached = $this->attached ? ' data-attached="' . $this->attached . '" ' : '';
- return '<div class="' . $this->getHTMLContainerClass() . '" style="mix-blend-mode:' . $this->blendmode . ';" data-blendmode="' . $this->blendmode . '" ' . $attached . ' data-hidden="' . $this->hidden . '" data-scorm="' . $this->scorm . '" data-id="' . $this->uid . '" id="l_' . $this->id . '"' . $addContent . '>' . $this->getHTMLContent() . '</div>';
+ return '<div class="' . $this->getHTMLContainerClass() . '" style="mix-blend-mode:' . $this->blendmode . ';'.$this->inlineStyles.'" data-blendmode="' . $this->blendmode . '" ' . $attached . ' data-hidden="' . $this->hidden . '" data-scorm="' . $this->scorm . '" data-id="' . $this->uid . '" id="l_' . $this->id . '"' . $addContent . '>' . $this->getHTMLContent() . '</div>';
}
public function getHTMLContainerClass()