forked from MapComplete/MapComplete
Add license info, fix non-updating values after reopening popups
This commit is contained in:
parent
576fd8ff40
commit
7b47af8978
11 changed files with 71 additions and 42 deletions
|
|
@ -15,13 +15,14 @@ export default class LocalStorageSaver implements FeatureSource {
|
|||
this.features = source.features;
|
||||
|
||||
this.features.addCallbackAndRun(features => {
|
||||
if (features === undefined) {
|
||||
return;
|
||||
}
|
||||
|
||||
const now = new Date().getTime()
|
||||
features = features.filter(f => layout.data.cacheTimeout > Math.abs(now - f.freshness.getTime())/1000)
|
||||
|
||||
if (features === undefined) {
|
||||
return;
|
||||
}
|
||||
|
||||
if(features.length == 0){
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue