forked from MapComplete/MapComplete
		
	Decent fix of gps-locking behaviour: single click will zoom, second click within 3sec will lock the gps location + better icons + disable of dragging while locked, fix of #458
This commit is contained in:
		
							parent
							
								
									4284f8184e
								
							
						
					
					
						commit
						aef7b8a684
					
				
					 10 changed files with 305 additions and 94 deletions
				
			
		|  | @ -23,21 +23,25 @@ export default class RightControls extends Combine { | |||
|         ); | ||||
| 
 | ||||
|         const plus = new MapControlButton( | ||||
|             Svg.plus_zoom_svg() | ||||
|             Svg.plus_svg(),{ | ||||
|                 dontStyle:true | ||||
|             } | ||||
|         ).onClick(() => { | ||||
|             State.state.locationControl.data.zoom++; | ||||
|             State.state.locationControl.ping(); | ||||
|         }); | ||||
| 
 | ||||
|         const min = new MapControlButton( | ||||
|             Svg.min_zoom_svg() | ||||
|             Svg.min_svg(),{ | ||||
|                 dontStyle: true | ||||
|             } | ||||
|         ).onClick(() => { | ||||
|             State.state.locationControl.data.zoom--; | ||||
|             State.state.locationControl.ping(); | ||||
|         }); | ||||
| 
 | ||||
|         super([plus, min, geolocationButton].map(el => el.SetClass("m-0.5 md:m-1"))) | ||||
|         this.SetClass("flex flex-col") | ||||
|         this.SetClass("flex flex-col items-center") | ||||
|     } | ||||
| 
 | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue