forked from MapComplete/MapComplete
		
	selected_element layer which highlights the selected element
This commit is contained in:
		
							parent
							
								
									e8ff43312f
								
							
						
					
					
						commit
						42bd301389
					
				
					 13 changed files with 146 additions and 32 deletions
				
			
		|  | @ -5,7 +5,7 @@ import Loc from "../../Models/Loc" | |||
| import BaseLayer from "../../Models/BaseLayer" | ||||
| import AvailableBaseLayers from "../../Logic/Actors/AvailableBaseLayers" | ||||
| import * as L from "leaflet" | ||||
| import { Map } from "leaflet" | ||||
| import {LeafletMouseEvent, Map} from "leaflet" | ||||
| import Minimap, { MinimapObj, MinimapOptions } from "./Minimap" | ||||
| import { BBox } from "../../Logic/BBox" | ||||
| import "leaflet-polylineoffset" | ||||
|  | @ -316,8 +316,10 @@ export default class MinimapImplementation extends BaseUIElement implements Mini | |||
| 
 | ||||
|         if (this._options.lastClickLocation) { | ||||
|             const lastClickLocation = this._options.lastClickLocation | ||||
|             map.on("click", function (e) { | ||||
|                 // @ts-ignore
 | ||||
|             map.on("click", function (e: LeafletMouseEvent) { | ||||
|                 if(e.originalEvent["dismissed"] ){ | ||||
|                     return | ||||
|                 } | ||||
|                 lastClickLocation?.setData({ lat: e.latlng.lat, lon: e.latlng.lng }) | ||||
|             }) | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue