]> _ Git - cubeextranet.git/commitdiff
#2656
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 3 Apr 2019 12:13:58 +0000 (12:13 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 3 Apr 2019 12:13:58 +0000 (12:13 +0000)
inc/ws/Util/html5/mobilefirst/class.ws.html5.compiler.php

index 2f365f638bcd604a78f62acf9c5846f3e635654b..0e857c47f42ea80b962283af3f3f07a504397d9e 100644 (file)
@@ -38,6 +38,7 @@ class wsHTML5Compiler
         'tweenmax' =>
             ['js/libs/gsap/TweenMax.min.js',
                 'js/libs/gsap/jquery.gsap.min.js',
+                'js/libs/gsap/plugins/ScrollToPlugin.min.js',
                 'js/libs/threejs/Tweenmax.threejs.js',],
         'hammer' => ['js/libs/hammer.min.js',],
         'gal' =>
@@ -257,6 +258,7 @@ class wsHTML5Compiler
 
         $daoTheme = new wsDAOTheme($core->con);
         $this->theme = $daoTheme->getThemeOfBook($book_id, true);
+
         $this->themeRoot = WS_THEMES . '/' . $this->theme->theme_id . '/';
 
         $daoDoc = new wsDAODocument($core->con);
@@ -290,10 +292,18 @@ class wsHTML5Compiler
         }
         $this->numerotation = explode(',', $this->book->numerotation);
 
+        if ($this->book->parametres->mobileNavigationType === 'mobilefirst') {
+            $this->initMobileFirst();
+        }
         $this->initConfig();
         $this->log('Defined dimensions');
     }
 
+    public function initMobileFirst()
+    {
+        $this->theme->parametres->usePageEdges = false;
+    }
+
     public function initConfig()
     {
         $this->config = cubeObject::merge($this->book->parametres->toStandardObject(), $this->theme->parametres->toStandardObject());
@@ -1731,6 +1741,7 @@ class wsHTML5Compiler
         $lessContents = '';
 
         $lessVariables = array();
+        $lessVariables['css-scale'] = $this->cssScale;
         $lessVariables['slider-display'] = $this->_lessBoolean($this->theme->parametres->pagesBar);
         $lessVariables['slider-thumb-background'] = wsHTML5::colorToCSS($this->theme->parametres->pageBarThumbBack);