forked from MapComplete/MapComplete
		
	Various bug fixes, add layer selection and background selection as parameter to the URL (fix #86, fix #84)
This commit is contained in:
		
							parent
							
								
									e35c85fc55
								
							
						
					
					
						commit
						97a69ff903
					
				
					 14 changed files with 111 additions and 25 deletions
				
			
		
							
								
								
									
										13
									
								
								Utils.ts
									
										
									
									
									
								
							
							
						
						
									
										13
									
								
								Utils.ts
									
										
									
									
									
								
							|  | @ -25,7 +25,7 @@ export class Utils { | |||
|     } | ||||
| 
 | ||||
|     static DoEvery(millis: number, f: (() => void)) { | ||||
|         if(State.runningFromConsole){ | ||||
|         if (State.runningFromConsole) { | ||||
|             return; | ||||
|         } | ||||
|         window.setTimeout( | ||||
|  | @ -36,6 +36,17 @@ export class Utils { | |||
|             , millis) | ||||
|     } | ||||
| 
 | ||||
|     public static NoNull<T>(array: T[]): T[] { | ||||
|         const ls: T[] = []; | ||||
|         for (const t of array) { | ||||
|             if (t === undefined || t === null) { | ||||
|                 continue; | ||||
|             } | ||||
|             ls.push(t); | ||||
|         } | ||||
|         return ls; | ||||
|     } | ||||
| 
 | ||||
|     public static CreateLanguagePicker(label: string | UIElement = "") { | ||||
| 
 | ||||
|         return new DropDown(label, State.state.layoutToUse.data.supportedLanguages.map(lang => { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue