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;
}
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':
}
+ public function getSurface()
+ {
+ return $this->width * $this->height;
+ }
+
public static function normalizeInlineIntegration($inline)
{
if ($inline == '1' || $inline === 'true') {
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>';
}