]> _ Git - cubeextranet.git/commitdiff
wip #2385 @1
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 30 Nov 2018 13:14:19 +0000 (13:14 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 30 Nov 2018 13:14:19 +0000 (13:14 +0000)
inc/ws/Util/html5/master/class.ws.html5.compiler.php

index 7474d156101dfa7718b699b285a81e246e0ca117..da2903103c6670107500d30158cc55612f9b55e4 100644 (file)
@@ -691,6 +691,7 @@ class wsHTML5Compiler
        <meta name="twitter:image" content="' . $socialImage . '">
        <meta name="twitter:site" content="@Fluidbook">
        <meta name="twitter:card" content="summary_large_image">';
+
                        $opengraph = '<meta property="og:title" content="' . $socialTitle . '"/>
        <meta property="og:description" content="' . $socialDescription . '"/>
        <meta property="og:image" content="' . $socialImage . '"/>
@@ -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 . '}';