]> _ Git - cubeextranet.git/commitdiff
wait #4576 @1.5
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 5 Jul 2021 13:48:03 +0000 (13:48 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 5 Jul 2021 13:48:03 +0000 (13:48 +0000)
inc/ws/Util/html5/master/class.ws.html5.compiler.php
inc/ws/Util/html5/master/class.ws.html5.links.php

index 3e9bfa47f6991d43c58259e21d5ccd22ff3ba056..9dbd42aa0bcac1a28b3a63e4b65d3de6c8836c90 100644 (file)
@@ -1918,10 +1918,14 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
 
     protected function _sortLinksByDepth($a, $b)
     {
-        $c = $a->getDepth() - $b->getDepth();
+        $c = $b->getDepth() - $a->getDepth();
         if ($c === 0) {
-            return $a->getInitialOrder() - $b->getInitialOrder();
+            $c = $b->getSurface() - $a->getSurface();
         }
+        if ($c === 0) {
+            $c = $b->getInitialOrder() - $a->getInitialOrder();
+        }
+
         return $c;
     }
 
@@ -2265,8 +2269,8 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
     protected function _font($f)
     {
         $default = 'Arial, Helvetica, sans-serif';
-        if($f==='OpenSans') {
-            $f='Open Sans';
+        if ($f === 'OpenSans') {
+            $f = 'Open Sans';
         }
         switch ($f) {
             case 'Montserrat':
index ff2cb86e1f00b813cc9d7511a19f919642bac52c..b87ad1dd52e0434700c8279237e778e6f8f4e5aa 100644 (file)
@@ -237,6 +237,11 @@ class wsHTML5Link
 
     }
 
+    public function getSurface()
+    {
+        return $this->width * $this->height;
+    }
+
     public static function normalizeInlineIntegration($inline)
     {
         if ($inline == '1' || $inline === 'true') {
@@ -463,7 +468,7 @@ class wsHTML5Link
 
     public function getHTMLContainer()
     {
-        $addContent=$this->getAdditionnalContent();
+        $addContent = $this->getAdditionnalContent();
         return '<div class="' . $this->getHTMLContainerClass() . '" data-blendmode="' . $this->blendmode . '" data-hidden="' . $this->hidden . '" data-scorm="' . $this->scorm . '" data-id="' . $this->uid . '" id="l_' . $this->id . '"' . $addContent . '>' . $this->getHTMLContent() . '</div>';
     }