forked from MapComplete/MapComplete
		
	Translations
This commit is contained in:
		
							parent
							
								
									615bbec05d
								
							
						
					
					
						commit
						369c19a58a
					
				
					 34 changed files with 287 additions and 173 deletions
				
			
		|  | @ -66,5 +66,16 @@ export class UIEventSource<T>{ | |||
| 
 | ||||
|     } | ||||
| 
 | ||||
|      | ||||
|     public syncWith(otherSource: UIEventSource<T>){ | ||||
|         this.addCallback((latest) => otherSource.setData(latest)); | ||||
|         const self = this; | ||||
|         otherSource.addCallback((latest) => self.setData(latest)); | ||||
|         if(this.data === undefined){ | ||||
|            this.setData(otherSource.data); | ||||
|         }else{ | ||||
|             otherSource.setData(this.data); | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue