loleaflet: scroll to [0, 0] after creating the tab control
Creating the tab control offset the document a bit so we need to reset it.
This commit is contained in:
parent
3a13f2bea4
commit
1970ab4a2e
1 changed files with 2 additions and 1 deletions
|
@ -30,7 +30,8 @@ L.Control.Tabs = L.Control.extend({
|
|||
setTimeout(L.bind(function () {
|
||||
this._map.invalidateSize();
|
||||
$('.scroll-container').mCustomScrollbar('update');
|
||||
}, this), 500);
|
||||
$('.scroll-container').mCustomScrollbar('scrollTo', [0, 0]);
|
||||
}, this), 100);
|
||||
for (var i = 0; i < parts; i++) {
|
||||
var id = 'spreadsheet-tab' + i;
|
||||
var tab = L.DomUtil.create('li', '', this._tabsCont);
|
||||
|
|
Loading…
Reference in a new issue