Add sidebar expand button, refresh CodeMirror on expand (scrollbar)
This commit is contained in:
parent
77cf43c7ef
commit
093db8bfe2
4 changed files with 18 additions and 3 deletions
|
|
@ -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 || '');
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue