forked from MapComplete/MapComplete
User flow improvements for the theme introduction panel
This commit is contained in:
parent
b4f739e506
commit
98866b4a57
10 changed files with 156 additions and 62 deletions
|
@ -230,10 +230,12 @@ export abstract class Store<T> {
|
|||
|
||||
const newSource = new UIEventSource<T>(this.data)
|
||||
|
||||
const self = this
|
||||
this.addCallback((latestData) => {
|
||||
window.setTimeout(() => {
|
||||
if (this.data == latestData) {
|
||||
// compare by reference
|
||||
if (self.data == latestData) {
|
||||
// compare by reference.
|
||||
// Note that 'latestData' and 'self.data' are both from the same UIEVentSource, but both are dereferenced at a different time
|
||||
newSource.setData(latestData)
|
||||
}
|
||||
}, millisToStabilize)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue