Don't add mouseover/out listeners to the layers control on android, otherwise your first touch will do mouseover, showing the list and click, clicking an item. Fixes #1694

This commit is contained in:
danzel 2013-06-25 15:44:33 +12:00
parent f1e87ef665
commit 8b742a024e

View File

@ -78,10 +78,11 @@ L.Control.Layers = L.Control.extend({
var form = this._form = L.DomUtil.create('form', className + '-list');
if (this.options.collapsed) {
L.DomEvent
.on(container, 'mouseover', this._expand, this)
.on(container, 'mouseout', this._collapse, this);
if (!L.Browser.android) {
L.DomEvent
.on(container, 'mouseover', this._expand, this)
.on(container, 'mouseout', this._collapse, this);
}
var link = this._layersLink = L.DomUtil.create('a', className + '-toggle', container);
link.href = '#';
link.title = 'Layers';