forked from MapComplete/MapComplete
		
	More refactoring, stabilizing rotation and direction_gradient
This commit is contained in:
		
							parent
							
								
									5fec108ba2
								
							
						
					
					
						commit
						778044d0fb
					
				
					 45 changed files with 656 additions and 640 deletions
				
			
		
							
								
								
									
										33
									
								
								UI/BigComponents/LayerControlPanel.ts
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								UI/BigComponents/LayerControlPanel.ts
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,33 @@ | |||
| import {UIElement} from "../UIElement"; | ||||
| import State from "../../State"; | ||||
| import BackgroundSelector from "./BackgroundSelector"; | ||||
| import LayerSelection from "./LayerSelection"; | ||||
| import Combine from "../Base/Combine"; | ||||
| 
 | ||||
| export default class LayerControlPanel extends UIElement{ | ||||
|     private readonly _panel: UIElement; | ||||
|      | ||||
|      | ||||
|     constructor() { | ||||
|         super(); | ||||
|         let layerControlPanel: UIElement = undefined; | ||||
|         if (State.state.layoutToUse.data.enableBackgroundLayerSelection) { | ||||
|             layerControlPanel = new BackgroundSelector(); | ||||
|             layerControlPanel.SetStyle("margin:1em"); | ||||
|             layerControlPanel.onClick(() => { | ||||
|             }); | ||||
|         } | ||||
| 
 | ||||
|         if (State.state.filteredLayers.data.length > 1) { | ||||
|             const layerSelection = new LayerSelection(); | ||||
|             layerSelection.onClick(() => {            }); | ||||
|             layerControlPanel = new Combine([layerSelection, "<br/>", layerControlPanel]); | ||||
|         } | ||||
|         this._panel = layerControlPanel; | ||||
|     } | ||||
|      | ||||
|     InnerRender(): string { | ||||
|         return this._panel.Render(); | ||||
|     } | ||||
|      | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue