]> _ Git - fluidbook-html5.git/commitdiff
done #2264 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 21 Sep 2018 15:04:04 +0000 (17:04 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 21 Sep 2018 15:04:04 +0000 (17:04 +0200)
js/libs/fluidbook/fluidbook.js

index af74a7f224ae0ff2ce40d6f952549caeca50591f..85e0765c68512c2266e6dc74e72dc1d391246a3e 100644 (file)
@@ -90,10 +90,8 @@ Fluidbook.prototype = {
         }
         $('html').addClass(this.datas.mobileLVersion);
         this.currentPage = -1;
-        this.maxPage = this.datas.pages;
-        if (this.datas.maxPages > 0) {
-            this.maxPage = Math.min(this.datas.maxPages, this.datas.pages);
-        }
+
+        this.initMaxPage();
 
         this.resize = new FluidbookResize(this);
         this.stats = new FluidbookStats(this);
@@ -104,6 +102,18 @@ Fluidbook.prototype = {
         this.initKeyboardShortcuts();
     },
 
+    initMaxPage:function(){
+        var $this=this;
+        key('⌘+alt+r, ctrl+alt+u', function(){
+            $this.setMaxPage(0);
+        });
+
+        this.maxPage = this.datas.pages;
+        if (this.datas.maxPages > 0) {
+            this.maxPage = Math.min(this.datas.maxPages, this.datas.pages);
+        }
+    },
+
     setMaxPage: function (p, allowbackwards) {
         var currentMaxPage = this.maxPage;
         if (allowbackwards === undefined) {