stopPropagation
This commit is contained in:
parent
5248f970e4
commit
7bdbd25fc2
1 changed files with 4 additions and 2 deletions
|
@ -1487,7 +1487,10 @@ SquareGridControl = L.Control.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
toggleGrid: function(e) {
|
toggleGrid: function(e) {
|
||||||
if(e) e.preventDefault();
|
if(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
e.stopPropagation();
|
||||||
|
}
|
||||||
if (c3nav._gridControl.gridActive) {
|
if (c3nav._gridControl.gridActive) {
|
||||||
c3nav._gridControl.hideGrid();
|
c3nav._gridControl.hideGrid();
|
||||||
} else {
|
} else {
|
||||||
|
@ -1562,7 +1565,6 @@ L.SquareGridLayer = L.Layer.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
_updateGrid: function(map) {
|
_updateGrid: function(map) {
|
||||||
|
|
||||||
var mapSize = map.getSize(), coord = null, lastCoord = null, size;
|
var mapSize = map.getSize(), coord = null, lastCoord = null, size;
|
||||||
for(i=0;i<this.config.cols.length;i++) {
|
for(i=0;i<this.config.cols.length;i++) {
|
||||||
coord = map.latLngToContainerPoint([0, this.config.cols[i]], map.getZoom()).x;
|
coord = map.latLngToContainerPoint([0, this.config.cols[i]], map.getZoom()).x;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue