Sidebar closed by default, avoid full-screen on mobile (#112)

This commit is contained in:
Norbert Renner 2018-04-09 18:50:53 +02:00
parent fe55f5f2cc
commit 1c9cef910b

View file

@ -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);