improve padding, maxWidth and overflow of click anywhere popups

This commit is contained in:
Laura Klünder 2019-12-23 17:04:26 +01:00
parent 02be155011
commit afb1128e3c
2 changed files with 7 additions and 2 deletions

View file

@ -750,7 +750,9 @@ main:not([data-view=route-result]) #route-dots {
border-top-width: 1px; border-top-width: 1px;
} }
.location { .location {
margin-right: 12px; margin-right: 24px;
padding-right: 0;
overflow: hidden;
} }
.button-clear { .button-clear {
display:block; display:block;

View file

@ -1315,7 +1315,7 @@ c3nav = {
} }
}, },
_add_map_padding: function(options, topleft, bottomright) { _add_map_padding: function(options, topleft, bottomright) {
// add padding information for the current ui layout to fitBoudns options // add padding information for the current ui layout to fitBounds options
var $search = $('#search'), var $search = $('#search'),
$main = $('main'), $main = $('main'),
padBesideSidebar = ( padBesideSidebar = (
@ -1324,6 +1324,9 @@ c3nav = {
), ),
left = padBesideSidebar ? ($search.width() || 0)+10 : 0, left = padBesideSidebar ? ($search.width() || 0)+10 : 0,
top = padBesideSidebar ? 10 : ($search.height() || 0)+10; top = padBesideSidebar ? 10 : ($search.height() || 0)+10;
if ('maxWidth' in options) {
options.maxWidth = Math.min(options.maxWidth, $main.width()-left-13-50)
}
options[topleft || 'paddingTopLeft'] = L.point(left+13, top+41); options[topleft || 'paddingTopLeft'] = L.point(left+13, top+41);
options[bottomright || 'paddingBottomRight'] = L.point(50, 20); options[bottomright || 'paddingBottomRight'] = L.point(50, 20);
return options; return options;