From: Vincent Vanwaelscappel Date: Tue, 28 May 2019 17:04:46 +0000 (+0200) Subject: fix #2797 @1 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=3e3d6b830bddba18168ec38a6b3c98d69f126afc;p=fluidbook-html5.git fix #2797 @1 --- diff --git a/js/libs/fluidbook/fluidbook.print.js b/js/libs/fluidbook/fluidbook.print.js index 435691d5..6a47b70f 100644 --- a/js/libs/fluidbook/fluidbook.print.js +++ b/js/libs/fluidbook/fluidbook.print.js @@ -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); diff --git a/style/print.less b/style/print.less index d1384eec..652b1a2f 100644 --- a/style/print.less +++ b/style/print.less @@ -79,16 +79,33 @@ &: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; + } } }