Switch to customized leaflet-sidebar-v2 (WIP)
Based on leaflet-sidebar-v2 fork of sidebar-v2: - Simpler because Leaflet-only - autopan option - seems more active with two contributers Customization for brouter-web in own fork (WIP): - hidden bar when collapsed - flat design to match header/footer - flexbox layout beside map instead of media breakpoints
This commit is contained in:
parent
65c0e92096
commit
3acd1171b1
5 changed files with 66 additions and 53 deletions
|
|
@ -3,6 +3,9 @@ BR.Sidebar = L.Control.Sidebar.extend({
|
|||
|
||||
options: {
|
||||
position: 'right',
|
||||
container: 'sidebar',
|
||||
tabContainer: 'sidebarTabs',
|
||||
autopan: false,
|
||||
|
||||
// Tabs to be notified when shown or hidden
|
||||
// (tab div id -> object implementing show/hide methods)
|
||||
|
|
@ -23,6 +26,11 @@ BR.Sidebar = L.Control.Sidebar.extend({
|
|||
|
||||
this._rememberTabState();
|
||||
|
||||
if (L.Browser.touch && BR.Browser.touchScreenDetectable && !BR.Browser.touchScreen) {
|
||||
L.DomUtil.removeClass(this._container, 'leaflet-touch');
|
||||
L.DomUtil.removeClass(this._tabContainer, 'leaflet-touch');
|
||||
}
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue