class zoomLink extends normalLink
{
+ protected $maxzoom_default = 2;
public function getHTMLContainerClass()
{
// Data attributes
$attributes = [
- 'maxzoom' => empty($this->to) ? 3 : $this->to,
+ 'maxzoom' => empty($this->to) ? $this->maxzoom_default : $this->to,
'group' => $this->group,
'group-count' => empty($this->group) ? 0 : count(explode(',', $this->group)),
'width' => round($this->width),
public function generateImage()
{
- $maxzoom = ((int)$this->to !== 0) ? $this->to : 2; // Max zoom level might not always be set in the link editor
+ $maxzoom = ((int)$this->to !== 0) ? $this->to : $this->maxzoom_default; // Max zoom level might not always be set in the link editor
$maxzoom = min($maxzoom, 4.166666667);
// TODO: Consider generating higher-res images (eg. 2x) for HiDPI screens. Maybe some extra optimisations can be done on the larger images...