]> _ Git - fluidbook-toolbox.git/commitdiff
wait #6633 @1
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 17 Jan 2024 11:05:24 +0000 (12:05 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 17 Jan 2024 11:05:24 +0000 (12:05 +0100)
app/Fluidbook/Compiler/Compiler.php

index 34909bc7fdfa5d39cfd94d3ae1b4412f3a364ffe..a2361ed3b4bb24a1c8a615b7774b324112e07679 100644 (file)
@@ -1418,13 +1418,16 @@ class Compiler extends Base implements CompilerInterface, IVirtualDirectoryError
 
     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);
+
     }