Erase the hash when an element is unselected

This commit is contained in:
Pieter Vander Vennet 2021-04-06 19:41:41 +02:00
parent 454f30cf3b
commit 61377d907b
3 changed files with 5 additions and 1 deletions

View file

@ -27,6 +27,10 @@ export default class SelectedFeatureHandler {
featureSource.features.addCallback(_ => self.selectFeature());
selectedFeature.addCallback(feature => {
if(feature === undefined){
hash.setData("")
}
const h = feature?.properties?.id;
if(h !== undefined){
hash.setData(h)