From c1c5173f3463eecbe8561777d76088ce87ee8bc2 Mon Sep 17 00:00:00 2001 From: David Molineus Date: Wed, 28 Jan 2015 09:26:19 +0100 Subject: [PATCH] Do not set autoPanPadding when it's empty (fix #29) --- src/Netzmacht/Contao/Leaflet/Mapper/UI/PopupMapper.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Netzmacht/Contao/Leaflet/Mapper/UI/PopupMapper.php b/src/Netzmacht/Contao/Leaflet/Mapper/UI/PopupMapper.php index 7b43077..8516756 100644 --- a/src/Netzmacht/Contao/Leaflet/Mapper/UI/PopupMapper.php +++ b/src/Netzmacht/Contao/Leaflet/Mapper/UI/PopupMapper.php @@ -80,7 +80,9 @@ class PopupMapper extends AbstractMapper ); if ($padding[0] === $padding[1]) { - $definition->setAutoPanPadding($padding[0]); + if (!empty($padding[0])) { + $definition->setAutoPanPadding($padding[0]); + } } else { if ($padding[0]) { $definition->setAutoPanPaddingTopLeft($padding[0]);