From: vincent@cubedesigners.com Date: Fri, 30 Nov 2018 13:14:19 +0000 (+0000) Subject: wip #2385 @1 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=569f878e93588737e7c5fe767177d9f6402805ab;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 7474d1561..da2903103 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/master/class.ws.html5.compiler.php @@ -691,6 +691,7 @@ class wsHTML5Compiler '; + $opengraph = ' @@ -1565,22 +1566,28 @@ 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'; - $w = $cssWidth . 'px'; + $wpage = $w = $cssWidth . 'px'; + if ($this->book->parametres->correctCenter) { + $wpage = ($cssWidth + 3) . '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; @@ -1589,7 +1596,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:' . $w . ';max-width:' . $w . ';height:' . $h . ';max-height:' . $h . '}'; + $res[] = '.portrait #pages,.portrait .doublePage.page,.page,.doublePage._3d{width:' . $wpage . ';max-width:' . $wpage . ';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)') . '}'; @@ -1598,7 +1605,7 @@ 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:' . $w . ';}'; + $res[] = '.doublePage._3d{left:' . $wpage . ';}'; $res[] = '#links.right{left:-' . $w . ';}'; $res[] = '.landscape .page.right{left:' . $w . '}';