Add sidebar expand button, refresh CodeMirror on expand (scrollbar)

This commit is contained in:
Norbert Renner 2018-03-19 19:27:10 +01:00
parent 77cf43c7ef
commit 093db8bfe2
4 changed files with 18 additions and 3 deletions

View file

@ -24,6 +24,7 @@ BR.Sidebar = L.Control.Sidebar.extend({
this.on('content', this._notifyOnContent, this);
this.on('closing', this._notifyOnClose, this);
this.on('toggleExpand', this._notifyOnResize, this);
this._rememberTabState();
@ -83,6 +84,13 @@ BR.Sidebar = L.Control.Sidebar.extend({
this.oldTab = null;
},
_notifyOnResize: function (e) {
var tab = this.oldTab;
if (tab && tab.onResize) {
tab.onResize();
}
},
_storeActiveTab: function (e) {
localStorage.setItem(this.storageId, e.id || '');
}