This commit is contained in:
Nils Schneider 2015-03-23 11:07:13 +01:00
parent 913030abb0
commit 85445a5c1b

View File

@ -284,11 +284,11 @@ function mkmap(map, newnodes, lostnodes, onlinenodes, graph, gotoAnything) {
funcDict[k] = function (d) { funcDict[k] = function (d) {
var m = markersDict[k] var m = markersDict[k]
var bounds var bounds
if ("getBounds" in m) {
if ("getBounds" in m)
bounds = m.getBounds() bounds = m.getBounds()
} else { else
bounds = L.latLngBounds([m.getLatLng()]) bounds = L.latLngBounds([m.getLatLng()])
}
map.fitBounds(bounds, {paddingTopLeft: [getSidebarWidth(), 0]}) map.fitBounds(bounds, {paddingTopLeft: [getSidebarWidth(), 0]})
m.openPopup(bounds.getCenter()) m.openPopup(bounds.getCenter())