| 
									
										
										
										
											2021-06-12 02:58:32 +02:00
										 |  |  | import BaseUIElement from "./BaseUIElement"; | 
					
						
							|  |  |  | import Combine from "./Base/Combine"; | 
					
						
							| 
									
										
										
										
											2021-02-21 03:38:12 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | /** | 
					
						
							|  |  |  |  * A button floating above the map, in a uniform style | 
					
						
							|  |  |  |  */ | 
					
						
							| 
									
										
										
										
											2021-06-28 00:45:49 +02:00
										 |  |  | export default class MapControlButton extends Combine { | 
					
						
							| 
									
										
										
										
											2021-07-27 21:02:30 +02:00
										 |  |  |   constructor(contents: BaseUIElement, options?:{ | 
					
						
							|  |  |  |     dontStyle?: boolean | 
					
						
							|  |  |  |   }) { | 
					
						
							| 
									
										
										
										
											2021-07-19 16:23:13 +02:00
										 |  |  |     super([contents]); | 
					
						
							| 
									
										
										
										
											2021-07-27 21:02:30 +02:00
										 |  |  |     if(!options?.dontStyle){ | 
					
						
							|  |  |  |     contents.SetClass("mapcontrol p-1") | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2021-07-19 16:23:13 +02:00
										 |  |  |     this.SetClass( | 
					
						
							| 
									
										
										
										
											2021-07-27 20:41:06 +02:00
										 |  |  |       "relative block rounded-full w-10 h-10 p-1 pointer-events-auto z-above-map subtle-background m-0.5 md:m-1" | 
					
						
							| 
									
										
										
										
											2021-07-19 16:23:13 +02:00
										 |  |  |     ); | 
					
						
							|  |  |  |     this.SetStyle("box-shadow: 0 0 10px var(--shadow-color);"); | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | } |