ignore dblclick on SquareGridControl
This commit is contained in:
parent
a3ecc08e0b
commit
0dbbcbb749
1 changed files with 2 additions and 5 deletions
|
@ -1460,7 +1460,7 @@ SquareGridControl = L.Control.extend({
|
||||||
onAdd: function () {
|
onAdd: function () {
|
||||||
this._container = L.DomUtil.create('div', 'leaflet-control-grid-layer leaflet-bar ' + this.options.addClasses);
|
this._container = L.DomUtil.create('div', 'leaflet-control-grid-layer leaflet-bar ' + this.options.addClasses);
|
||||||
this._button = L.DomUtil.create('a', 'material-icons', this._container);
|
this._button = L.DomUtil.create('a', 'material-icons', this._container);
|
||||||
$(this._button).click(this.toggleGrid);
|
$(this._button).click(this.toggleGrid).dblclick(function(e) { e.stopPropagation(); });
|
||||||
this._button.innerHTML = 'grid_off';
|
this._button.innerHTML = 'grid_off';
|
||||||
this._button.href = '#';
|
this._button.href = '#';
|
||||||
this._button.style.color = '#BBBBBB';
|
this._button.style.color = '#BBBBBB';
|
||||||
|
@ -1472,10 +1472,7 @@ SquareGridControl = L.Control.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
toggleGrid: function(e) {
|
toggleGrid: function(e) {
|
||||||
if(e) {
|
if(e) e.preventDefault();
|
||||||
e.preventDefault();
|
|
||||||
e.stopPropagation();
|
|
||||||
}
|
|
||||||
if (c3nav._gridControl.gridActive) {
|
if (c3nav._gridControl.gridActive) {
|
||||||
c3nav._gridControl.hideGrid();
|
c3nav._gridControl.hideGrid();
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue