public function addBookmarkGroup($link)
{
- if ($link['left'] > $this->fluidbookSettings->width) {
- //$link['page']++;
+
+ if ($link['left'] > $this->getWidthForLinks()) {
+ $link['page']++;
}
- if ($link['page'] <= 0 || $link['page'] > $this->fluidbookSettings->pages) {
+ if ($link['page'] <= 0 || $link['page'] > $this->getPageNumber()) {
return;
}
- $this->config->push('bookmarkGroups', ['page' => ($link['page']), 'nb' => $link['to'], 'name' => $link['extra']]);
+ $data = ['page' => ($link['page']), 'nb' => $link['to'], 'name' => $link['extra']];
+ $this->config->push('bookmarkGroups', $data);
+
}