Zoom home offset if sidebar is open

19 views
Skip to first unread message

Valerio De Luca

unread,
May 22, 2018, 2:05:43 PM5/22/18
to Leaflet
Hi guys, this is my webmap:


Everything works perfectly: sidebar(v2), autopan, popup content go in sidebar panels fine.

Only a few trouble. At top right I have zoom home button.
When sidebar is close everything go fine: zoom home button center my map.
When sidebar is open the zoom home makes the same thing but the sidebar hide part of my center map.
I'd like a little right-offset on result of zoom home button when sidebar is open.
Something like: 

if sidebar.close() = true
zoomhome
else
zoomhome.offset

Any advices are welcome, thanks!
Valerio 
Reply all
Reply to author
Forward
0 new messages