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:
Mihai Varga 2015-12-16 16:15:39 +02:00
parent 3a13f2bea4
commit 1970ab4a2e

View file

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