]> _ Git - fluidbook-html5.git/commitdiff
fix #2797 @1
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 28 May 2019 17:04:46 +0000 (19:04 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 28 May 2019 17:04:46 +0000 (19:04 +0200)
js/libs/fluidbook/fluidbook.print.js
style/print.less

index 435691d5fbcf9bb1d83d7171c23295ee12967a6d..6a47b70f2ed7b960f9ea9e3134cbc32335176403 100644 (file)
@@ -81,7 +81,6 @@ FluidbookPrint.prototype = {
         // Ensure mode is either download or print (default)
         mode = (mode === 'download' ? mode : 'print');
 
-        // Todo: handle RTL differences for page numbers? See fluidbook.index.js for example
         this.leftPageNumber = this.fluidbook.getPhysicalPageNumberOfSide('left');
         this.rightPageNumber = this.fluidbook.getPhysicalPageNumberOfSide('right');
         this.isFirstPage = (this.fluidbook.currentPage === 0);
@@ -234,12 +233,13 @@ FluidbookPrint.prototype = {
             if (this.isFirstPage) {
                 leftPage = this.rightPageNumber;
             }
+
             view += this.getSinglePage('left', leftPage, onePage ? __('Current page') : __('left page'), !onePage);
             if (!onePage) {
                 view += this.getSinglePage('right', rightPage, __('right page'), true);
             }
         } else {
-            if (this.isFirstPage) {
+            if (this.isFirstPage || this.isSinglePageMode) {
                 rightPage = this.leftPageNumber;
             }
             view += this.getSinglePage('right', rightPage, onePage ? __('Current page') : __('right page'), !onePage);
index d1384eec709ba76d38b4dcf4f7c3c25c87d3b5a3..652b1a2fe55547f04d31c3bdaf63a078e1260644 100644 (file)
 
       &:nth-child(1) {
         z-index: 3;
+
+        .rtl & {
+          right: 0;
+          z-index: 1;
+        }
       }
 
       &:nth-child(2) {
         left: 50px;
         z-index: 2;
+
+        .rtl & {
+          right: 50px;
+          left: auto;
+
+        }
       }
 
       &:nth-child(3) {
         left: 100px;
         z-index: 1;
+
+        .rtl & {
+          right: 100px;
+          left: auto;
+          z-index: 3;
+        }
       }
     }