Add license info, fix non-updating values after reopening popups

This commit is contained in:
Pieter Vander Vennet 2021-04-17 23:36:46 +02:00
parent 576fd8ff40
commit 7b47af8978
11 changed files with 71 additions and 42 deletions

View file

@ -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;
}

View file

@ -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);
}