map: fix coord picker on first click
This commit is contained in:
		
							parent
							
								
									f9e8c72508
								
							
						
					
					
						commit
						6fbc531c17
					
				| @ -85,7 +85,8 @@ define(["map/clientlayer", "map/labelslayer", | |||||||
|         var button = L.DomUtil.create("button", "coord-picker") |         var button = L.DomUtil.create("button", "coord-picker") | ||||||
|         button.textContent = "" |         button.textContent = "" | ||||||
| 
 | 
 | ||||||
|         L.DomEvent.disableClickPropagation(button) |         // Click propagation isn't disabled as this causes problems with the
 | ||||||
|  |         // location picking mode; instead propagation is stopped in onClick().
 | ||||||
|         L.DomEvent.addListener(button, "click", this.onClick, this) |         L.DomEvent.addListener(button, "click", this.onClick, this) | ||||||
| 
 | 
 | ||||||
|         this.button = button |         this.button = button | ||||||
| @ -102,7 +103,8 @@ define(["map/clientlayer", "map/labelslayer", | |||||||
|         this.update() |         this.update() | ||||||
|       }, |       }, | ||||||
| 
 | 
 | ||||||
|       onClick: function () { |       onClick: function (e) { | ||||||
|  |         L.DomEvent.stopPropagation(e) | ||||||
|         this.f(!this.active) |         this.f(!this.active) | ||||||
|       } |       } | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user