From 544f2bf52c991856b44e70bc0d96e3ff9621e47c Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Mon, 5 Jul 2021 13:48:03 +0000 Subject: [PATCH] wait #4576 @1.5 --- inc/ws/Util/html5/master/class.ws.html5.compiler.php | 12 ++++++++---- inc/ws/Util/html5/master/class.ws.html5.links.php | 7 ++++++- 2 files changed, 14 insertions(+), 5 deletions(-) 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 3e9bfa47f..9dbd42aa0 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/master/class.ws.html5.compiler.php @@ -1918,10 +1918,14 @@ height="0" width="0" style="display:none;visibility:hidden"> 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"> 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': diff --git a/inc/ws/Util/html5/master/class.ws.html5.links.php b/inc/ws/Util/html5/master/class.ws.html5.links.php index ff2cb86e1..b87ad1dd5 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.links.php +++ b/inc/ws/Util/html5/master/class.ws.html5.links.php @@ -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 '
' . $this->getHTMLContent() . '
'; } -- 2.39.5