Do not close the infobox when data is loaded...
This commit is contained in:
parent
8a4e4a8ee6
commit
8c1861f98d
1 changed files with 5 additions and 1 deletions
|
@ -9,6 +9,8 @@ export default class SelectedFeatureHandler {
|
|||
private readonly _hash: UIEventSource<string>;
|
||||
private readonly _selectedFeature: UIEventSource<any>;
|
||||
|
||||
private static readonly _no_trigger_on = ["welcome","copyright","layers"]
|
||||
|
||||
constructor(hash: UIEventSource<string>,
|
||||
selectedFeature: UIEventSource<any>,
|
||||
featureSource: FeatureSource) {
|
||||
|
@ -28,8 +30,10 @@ export default class SelectedFeatureHandler {
|
|||
|
||||
selectedFeature.addCallback(feature => {
|
||||
if(feature === undefined){
|
||||
if(SelectedFeatureHandler._no_trigger_on.indexOf(hash.data) < 0){
|
||||
hash.setData("")
|
||||
}
|
||||
}
|
||||
|
||||
const h = feature?.properties?.id;
|
||||
if(h !== undefined){
|
||||
|
|
Loading…
Reference in a new issue