$dupData['interactive'] = false;
$dupData['alternative'] = $linkData['animation'];
$dupData['type'] = 6;
- $dupData['uid'] = 'a_' . $linkData['uid'];
+ $linkData['relatedAnimation'] = $dupData['uid'] = 'a_' . $linkData['uid'];
$dupData['video_width'] = $dupData['video_height'] = 0;
if (wsHTML5Link::isScorm($linkData)) {
$dupData['scorm'] = true;
}
+ $links[$k] = $linkData;
array_push($links, $dupData);
}
if ($linkData['type'] == 7) {
public $parallax = 0;
public $attachLeft = false;
public $allowsAnimation = true;
+ public $relatedAnimation = '';
public $forceTexture = false;
public $letterspacing = 0;
- public $backgroundColor=null;
+ public $backgroundColor = null;
protected $role = 'button';
public function getHTMLContainer()
{
$addContent = $this->getAdditionnalContent();
+ if ($this->relatedAnimation) {
+ $addContent .= ' data-related-animation="' . $this->relatedAnimation . '"';
+ }
return '<div class="' . $this->getHTMLContainerClass() . '" data-blendmode="' . $this->blendmode . '" data-hidden="' . $this->hidden . '" data-scorm="' . $this->scorm . '" data-id="' . $this->uid . '" id="l_' . $this->id . '"' . $addContent . '>' . $this->getHTMLContent() . '</div>';
}
$res = parent::getAdditionnalContent();
$dim = CubeIT_Image::getimagesize($this->wdir . '/' . $this->alternative);
- $bg=null===$this->backgroundColor?'':' style="background-color:'.$this->backgroundColor.';"';
+ $bg = null === $this->backgroundColor ? '' : ' style="background-color:' . $this->backgroundColor . ';"';
- $markup = '<div class="multimediaContainer" data-click-to-close="' . $this->clickToClose . '"><img'.$bg.' data-width="' . $dim[0] . '" data-height="' . $dim[1] . '" src="' . wsHTML5Link::getUniversalLocation($this->alternative) . '" width="' . $dim[0] . '" height="' . $dim[1] . '" class="multimedia" /></div>';
+ $markup = '<div class="multimediaContainer" data-click-to-close="' . $this->clickToClose . '"><img' . $bg . ' data-width="' . $dim[0] . '" data-height="' . $dim[1] . '" src="' . wsHTML5Link::getUniversalLocation($this->alternative) . '" width="' . $dim[0] . '" height="' . $dim[1] . '" class="multimedia" /></div>';
$read = '';
if ($this->read_mode) {
$read = ' data-readmode="1"';
$p = wsDAOBook::getDocumentPage($compiler->book_id, $attributes['page']);
$pdfpath = wsDocument::getDir($p['document_id']) . '/pdf/p' . $p['document_page'] . '.pdf';
$extractPage = 1;
- if(!file_exists($pdfpath)){
+ if (!file_exists($pdfpath)) {
$pdfpath = wsDocument::getDir($p['document_id']) . '/crop.pdf';
$extractPage = $p['document_page'];
}
}
-
$left = CubeIT_Files::tempnam();
$leftfile = CubeIT_CommandLine_Poppler::extractArea($pdfpath,
$extractPage,
$p = wsDAOBook::getDocumentPage($compiler->book_id, $attributes['page'] + 1);
$pdfpath = wsDocument::getDir($p['document_id']) . '/pdf/p' . $p['document_page'] . '.pdf';
$extractPage = 1;
- if(!file_exists($pdfpath)){
+ if (!file_exists($pdfpath)) {
$pdfpath = wsDocument::getDir($p['document_id']) . '/crop.pdf';
$extractPage = $p['document_page'];
}