class Link {
- protected static string|false|null $_linksKey=null;
+ protected static string|false|null $_linksKey = null;
public $left;
public $top;
public $width;
}
public function getCssScale() {
- if (is_int($this->page)) {
+ if (is_numeric($this->page) || is_int($this->page)) {
return $this->compiler->getLinkScale();
} else {
return 1;
$this->left += $this->compiler->getWidth();
}
-
$css = '#l_' . $this->id . '{';
$css .= 'left:' . round($this->left * $this->getCssScale()) . 'px;top:' . round($this->top * $this->getCssScale()) . 'px;';
$css .= 'width:' . round($this->width * $this->getCssScale()) . 'px;height:' . round($this->height * $this->getCssScale()) . 'px;';
}
- public static function encryptLinks($links)
- {
+ public static function encryptLinks($links) {
$res = [];
foreach ($links as $key => $link) {
$res[$key] = self::encryptLinkAttrs($link);
/**
* @throws SodiumException
*/
- public static function encryptLinkAttrs($link)
- {
+ public static function encryptLinkAttrs($link) {
$crypted = [13, 14, 35];
if (!isset($link['type']) || !in_array($link['type'], $crypted)) {
}
-
}