forked from MapComplete/MapComplete
Add current location in localstorage, fixes #13
This commit is contained in:
parent
2a61ae6e1f
commit
89b78ee709
5 changed files with 28 additions and 25 deletions
|
@ -67,7 +67,7 @@ export class UIEventSource<T>{
|
|||
}
|
||||
|
||||
|
||||
public syncWith(otherSource: UIEventSource<T>){
|
||||
public syncWith(otherSource: UIEventSource<T>) : UIEventSource<T>{
|
||||
this.addCallback((latest) => otherSource.setData(latest));
|
||||
const self = this;
|
||||
otherSource.addCallback((latest) => self.setData(latest));
|
||||
|
@ -76,6 +76,7 @@ export class UIEventSource<T>{
|
|||
}else{
|
||||
otherSource.setData(this.data);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue