Sidebar closed by default, avoid full-screen on mobile (#112)
This commit is contained in:
parent
fe55f5f2cc
commit
1c9cef910b
1 changed files with 4 additions and 2 deletions
|
|
@ -49,10 +49,12 @@ BR.Sidebar = L.Control.Sidebar.extend({
|
|||
|
||||
var tabId = localStorage.getItem(this.storageId);
|
||||
|
||||
// not set: open sidebar by default for new users
|
||||
// 'true': legacy value for toggling old sidebar
|
||||
if (tabId === null || tabId === 'true') {
|
||||
if (tabId === 'true') {
|
||||
tabId = this.options.defaultTabId;
|
||||
} else if (tabId === null) {
|
||||
// not set: closed by default for new users
|
||||
tabId = '';
|
||||
}
|
||||
if (tabId !== '') {
|
||||
this.open(tabId);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue