forked from MapComplete/MapComplete
		
	Add standalone bicycle library theme, search now opens the popup of the found object
This commit is contained in:
		
							parent
							
								
									a35b80afbb
								
							
						
					
					
						commit
						c359d43b15
					
				
					 15 changed files with 260 additions and 43 deletions
				
			
		|  | @ -2,11 +2,17 @@ import {UIEventSource} from "../UIEventSource"; | |||
| 
 | ||||
| export default class Hash { | ||||
|      | ||||
|     public static Get() : UIEventSource<string>{ | ||||
|     public static hash : UIEventSource<string> = Hash.Get(); | ||||
|      | ||||
|     private static Get() : UIEventSource<string>{ | ||||
|         const hash = new UIEventSource<string>(window.location.hash.substr(1)); | ||||
|         hash.addCallback(h => { | ||||
|             if(h === undefined || h === ""){ | ||||
|                 window.location.hash = ""; | ||||
|                 return; | ||||
|             } | ||||
|             h = h.replace(/\//g, "_"); | ||||
|             return window.location.hash = "#" + h; | ||||
|             window.location.hash = "#" + h; | ||||
|         }); | ||||
|         window.onhashchange = () => { | ||||
|             hash.setData(window.location.hash.substr(1)) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue