$compiler->addAudiodescription($init);
break;
case 26:
- $compiler->addPageLabel($init['page'], $init['to']);
- break;
+ case 40:
+ return new anchorLink($id, $init, $compiler);
case 27:
return new eventOverlayLink($id, $init, $compiler);
case 29:
break;
case 39:
return new layerLink($id, $init, $compiler);
- case 40:
- return new anchorLink($id, $init, $compiler);
default:
return null;
}
public function getHTMLContainer()
{
+ $this->compiler->addPageLabel($this->page, $this->to);
return '<div aria-hidden="false" data-anchor="' . trim($this->to, '# ') . '" class="anchor ' . $this->getHTMLContainerClass() . '" data-hidden="' . $this->hidden . '" data-scorm="' . $this->scorm . '" data-id="' . $this->uid . '" id="l_' . $this->id . '"' . $this->getAdditionnalContent() . '>' . $this->getHTMLContent() . '</div>';
}
if (count($e) > 1) {
$anchor = trim($e[1], '# ');
}
-
- if ($this->numerotation === 'physical') {
+ if ($anchor) {
+ $res = $anchor;
+ } else if ($this->numerotation === 'physical') {
$res = $p;
} else {
$res = $this->compiler->virtualToPhysical($p);
}
- if ($anchor) {
- $res .= '/' . $anchor;
- }
+
return $res;
}