calculate correct padding for flyToBounds
This commit is contained in:
parent
0acc1a6413
commit
d05ae2d7da
1 changed files with 4 additions and 0 deletions
|
@ -326,7 +326,11 @@ c3nav = {
|
|||
}
|
||||
c3nav._levelControl.setLevel(level);
|
||||
if (bounds !== null) {
|
||||
var left = 0,
|
||||
top = (left === 0) ? $('#search').height()+10 : 10;
|
||||
c3nav.map.flyToBounds(bounds, {
|
||||
paddingTopLeft: L.point(left+13, top+41),
|
||||
paddingBottomRight: L.point(50, 20),
|
||||
duration: 1
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue