continue;
}
+ $linksToAdd = [$link];
+ if ($this->book_id == 18153) {
+ if ($link->overlapDoublePage()) {
+ $linksToAdd[] = $link->getRightClone();
+ }
+ }
+
+ foreach ($linksToAdd as $lta) {
+ $c = $lta->getHTMLContainer();
+ $css[] = $lta->getCSSContainer();
+ if (!isset($pages[$lta->page])) {
+ $pages[$lta->page] = '';
+ $cpages[$lta->page] = '';
+ }
+ if ($lta instanceof contentLink) {
+ $cpages[$lta->page] .= $c;
+ } else {
+ $pages[$lta->page] .= $c;
+ }
+ }
// Make old "aftersearch" link compatible with new "extra" menu option by extracting link URL
if ($link->page == 'aftersearch') {
$this->config->afterSearchLink = $link->to;
}
- $c = $link->getHTMLContainer();
- $css[] = $link->getCSSContainer();
- if (!isset($pages[$link->page])) {
- $pages[$link->page] = '';
- $cpages[$link->page] = '';
- }
- if ($link instanceof contentLink) {
- $cpages[$link->page] .= $c;
- } else {
- $pages[$link->page] .= $c;
- }
-
$allLinksData[$linkData['uid']] = $linkData;
if ($link->keep()) {
public $scorm;
public $hidden = false;
public $zindex = 4;
+ public $rightClone = false;
public $iframeType = "none";
protected $_init;
$this->init();
}
+ public function overlapDoublePage()
+ {
+ return ($this->page % 2 == 0 && $this->left + $this->width > $this->compiler->width);
+ }
+
+ public function getRightClone()
+ {
+ $res = clone $this;
+ $res->page++;
+ $res->left -= $this->compiler->width;
+ $res->rightClone = true;
+ $res->id .= '_c';
+ $res->init();
+ return $res;
+ }
+
public function init()
{
public function getTooltip()
{
- if (is_null($this->infobulle) || !$this->infobulle) {
+ if ($this->infobulle === null || !$this->infobulle) {
if ($this->getDefaultTooltip() === false) {
return;
}
public function getHTMLContainerClass()
{
$res = trim('link ' . $this->class);
- if (intval($this->page) % 2 == 1) {
+ if ((int)$this->page % 2 == 1) {
$res .= ' odd';
}
+ if ($this->rightClone) {
+ $res .= ' rightclone';
+ }
+
return $res;
}