forked from MapComplete/MapComplete
		
	Fix: attempt to fix layers which don't hide
This commit is contained in:
		
							parent
							
								
									26902c488f
								
							
						
					
					
						commit
						01034b186e
					
				
					 7 changed files with 80 additions and 38 deletions
				
			
		|  | @ -5,6 +5,7 @@ | |||
|   import LayerState from "../../Logic/State/LayerState" | ||||
|   import FloorSelector from "../InputElement/Helpers/FloorSelector.svelte" | ||||
|   import { Store, UIEventSource } from "../../Logic/UIEventSource" | ||||
|   import { onDestroy } from "svelte" | ||||
| 
 | ||||
|   export let layerState: LayerState | ||||
|   export let floors: Store<string[]> | ||||
|  | @ -35,6 +36,15 @@ | |||
|     }, | ||||
|     [floors, zoom] | ||||
|   ) | ||||
| 
 | ||||
|   onDestroy( | ||||
|     layerState.globalFilters.addCallbackD(globalFilters => { | ||||
|       console.log("Global filters are now", globalFilters) | ||||
|       if (!globalFilters.some(gf => gf.id === "level")) { | ||||
|         selectedFloor.set(all) | ||||
|       } | ||||
|     }) | ||||
|   ) | ||||
| </script> | ||||
| 
 | ||||
| {#if $zoom >= maxZoom} | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue