use Illuminate\Support\Facades\Log;
-class LayerLink extends ImageLink {
+class LayerLink extends ImageLink
+{
protected $maxzoom_default = 4;
public $defaultZIndex = 30;
- public function ignore() {
+ public function ignore()
+ {
return parent::ignore() || $this->isOutsidePage();
}
- public function __construct($id, $init, &$compiler) {
+ public function __construct($id, $init, &$compiler)
+ {
if ($init['to'] === 'text' || $init['to'] === 'onlytext') {
$this->defaultZIndex++;
}
/**
* @throws \Exception
*/
- public function getCSS() {
+ public function getCSS()
+ {
$attributes = $this->getZoomAttributes();
if (!$this->rightClone) {
ZoomLink::generateImage($attributes, $this->compiler, 'layerlink', 'layer');
}
}
- public function getAdditionnalContent() {
+ public function getAdditionnalContent()
+ {
$res = parent::getAdditionnalContent();
$res .= ' data-layer="' . $this->to . '"';
return $res;
}
- public function getImageUrl() {
+ public function getImageUrl()
+ {
return 'data/links/layer_' . $this->uid . '.' . $this->_getExtension();
}
- protected function _getExtension() {
+ protected function _getExtension()
+ {
if ($this->_getLayer() === 'text' || $this->_getLayer() === 'onlytext' || $this->_getLayer() === 'bothsvg') {
return 'svg';
} else {
}
}
- protected function _getLayer() {
+ protected function _getLayer()
+ {
return $this->to ?: 'both';
}
- public function getZoomAttributes() {
+ public function getZoomAttributes()
+ {
$layer = $this->_getLayer();
+
return [
'id' => $this->uid,
'page' => $this->page,