forked from MapComplete/MapComplete
Erase the hash when an element is unselected
This commit is contained in:
parent
454f30cf3b
commit
61377d907b
3 changed files with 5 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue