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;
|
||||
}
|
||||
|
|
|
@ -15,8 +15,11 @@ export default class MetaTaggingFeatureSource implements FeatureSource {
|
|||
}
|
||||
featuresFreshness.forEach(featureFresh => {
|
||||
const feature = featureFresh.feature;
|
||||
State.state.allElements.addOrGetElement(feature);
|
||||
|
||||
|
||||
if(!State.state.allElements.has(feature.properties.id)){
|
||||
State.state.allElements.addOrGetElement(feature)
|
||||
}
|
||||
|
||||
if (Hash.hash.data === feature.properties.id) {
|
||||
State.state.selectedElement.setData(feature);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue