if ($this->stats) {
$res .= 'data-stats="' . htmlspecialchars(json_encode($this->stats), ENT_QUOTES) . '" ';
}
+ if ($this->isOutsidePage()) {
+ $res .= ' data-outside-page="1" tabindex="-1"';
+ }
return $res;
public function isOutsidePage()
{
- return $this->top > $this->compiler->getHeightForLinks($this->page) || $this->left > $this->compiler->getWidthForLinks($this->page);
+ return $this->top + $this->height <= 0 || $this->top > $this->compiler->getHeightForLinks($this->page) || $this->left > $this->compiler->getWidthForLinks($this->page) || $this->left + $this->width <= 0;;
}
public function ignore()