forked from MapComplete/MapComplete
		
	Do not show quickswitch if background map switching is disabled
This commit is contained in:
		
							parent
							
								
									e21f7f4dee
								
							
						
					
					
						commit
						2bead588fb
					
				
					 4 changed files with 12 additions and 5 deletions
				
			
		|  | @ -19,6 +19,7 @@ import BackgroundMapSwitch from "./BackgroundMapSwitch"; | |||
| export default class LeftControls extends Combine { | ||||
| 
 | ||||
|     constructor(state: { | ||||
|                     featureSwitchBackgroundSelection: UIEventSource<boolean>; | ||||
|                     layoutToUse: LayoutConfig, | ||||
|                     featurePipeline: FeaturePipeline, | ||||
|                     currentBounds: UIEventSource<BBox>, | ||||
|  | @ -74,10 +75,16 @@ export default class LeftControls extends Combine { | |||
|             undefined, | ||||
|             state.featureSwitchFilter | ||||
|         ); | ||||
|          | ||||
|         const mapSwitch = new Toggle( | ||||
|             new BackgroundMapSwitch(state, state.backgroundLayer), | ||||
|             undefined, | ||||
|             state.featureSwitchBackgroundSelection | ||||
|         ) | ||||
| 
 | ||||
|         super([filterButton, | ||||
|             downloadButtonn, | ||||
|             new BackgroundMapSwitch(state, state.backgroundLayer) | ||||
|            mapSwitch | ||||
|         ]) | ||||
| 
 | ||||
|         this.SetClass("flex flex-col") | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue