From: vincent@cubedesigners.com Date: Fri, 30 Nov 2018 14:16:19 +0000 (+0000) Subject: wip #2385 @1 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=87a670636ea86e0436dba4e8e0071f03a9546637;p=cubeextranet.git wip #2385 @1 --- diff --git a/inc/ws/Util/html5/master/class.ws.html5.compiler.php b/inc/ws/Util/html5/master/class.ws.html5.compiler.php index da2903103..a776002bc 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/master/class.ws.html5.compiler.php @@ -691,7 +691,6 @@ class wsHTML5Compiler '; - $opengraph = ' @@ -1566,28 +1565,22 @@ class wsHTML5Compiler // General theme $cssWidth = $this->cssWidth; - $cssHeight = $this->cssHeight; $cssScale = $this->cssScale; $w2 = ($cssWidth * 2) . 'px'; + $h = $cssHeight . 'px'; $wm = ($this->width * $this->multiply) . 'px'; $hm = ($this->height * $this->multiply) . 'px'; - $wpage = $w = $cssWidth . 'px'; - if ($this->book->parametres->correctCenter) { - $wpage = ($cssWidth + 3) . 'px'; - } - + $w = $cssWidth . 'px'; $offsetLeft = round(($this->optimalWidth - $cssWidth) / 2, 3); $offsetLeft2 = $offsetLeft * 2; $offsetTop = round(($this->optimalHeight - $cssHeight) / 2, 3); $navTop = ($cssHeight - 40 - 100) / 2; $leftOfRightPage = (floor($cssWidth) - 1) . 'px'; - - $lessVariables['z'] = $this->z; $lessVariables['book-page-width'] = $w; $lessVariables['book-page-height'] = $h; @@ -1596,7 +1589,7 @@ class wsHTML5Compiler $lessVariables['shadow-opacity'] = wsHTML5::colorToArray($this->theme->parametres->bookShadeColor)['opacity'] * 1.2; $lessVariables['edges-display'] = $this->_lessBoolean($this->theme->parametres->usePageEdges); - $res[] = '.portrait #pages,.portrait .doublePage.page,.page,.doublePage._3d{width:' . $wpage . ';max-width:' . $wpage . ';height:' . $h . ';max-height:' . $h . '}'; + $res[] = '.portrait #pages,.portrait .doublePage.page,.page,.doublePage._3d{width:' . $w . ';max-width:' . $w . ';height:' . $h . ';max-height:' . $h . '}'; $res[] = '.doublePage,#pages,#links,#searchHighlights{width:' . $w2 . ';max-width:' . $w2 . ';height:' . $h . ';max-height:' . $h . '}'; $res[] = '.landscape .doublePage._2d.axis_x.next{' . wsHTML5::writeCSSUA('transform', 'translate3d(' . $w2 . ',0,0)') . '}'; $res[] = '.landscape .doublePage._2d.axis_x.prev{' . wsHTML5::writeCSSUA('transform', 'translate3d(-' . $w2 . ',0,0)') . '}'; @@ -1605,9 +1598,17 @@ class wsHTML5Compiler $res[] = '.doublePage._2d.axis_y.next{' . wsHTML5::writeCSSUA('transform', 'translate3d(0,' . $h . ',0)') . '}'; $res[] = '.doublePage._2d.axis_y.prev{' . wsHTML5::writeCSSUA('transform', 'translate3d(0,-' . $h . ',0)') . '}'; - $res[] = '.doublePage._3d{left:' . $wpage . ';}'; - $res[] = '#links.right{left:-' . $w . ';}'; - $res[] = '.landscape .page.right{left:' . $w . '}'; + + $left = $w; + if ($this->book->parametres->correctCenter) { + $centerOffset = 3; + $left = ($cssWidth - $centerOffset) . 'px'; + $res[] = '.doublePage._3d .page.left{left:-' . ($centerOffset + 1) . 'px !important;}'; + } + + $res[] = '.doublePage._3d{left:' . $left . ';}'; + $res[] = '#links.right{left:-' . $left . ';}'; + $res[] = '.landscape .page.right{left:' . $left . '}'; $lessVariables['page-number-color'] = wsHTML5::colorToCSS($this->theme->parametres->colorPageNumber); $lessVariables['display-page-number'] = $this->_lessBoolean($this->theme->parametres->displayPageNumber);