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 _hash: UIEventSource<string>;
|
||||||
private readonly _selectedFeature: UIEventSource<any>;
|
private readonly _selectedFeature: UIEventSource<any>;
|
||||||
|
|
||||||
|
private static readonly _no_trigger_on = ["welcome","copyright","layers"]
|
||||||
|
|
||||||
constructor(hash: UIEventSource<string>,
|
constructor(hash: UIEventSource<string>,
|
||||||
selectedFeature: UIEventSource<any>,
|
selectedFeature: UIEventSource<any>,
|
||||||
featureSource: FeatureSource) {
|
featureSource: FeatureSource) {
|
||||||
|
@ -28,7 +30,9 @@ export default class SelectedFeatureHandler {
|
||||||
|
|
||||||
selectedFeature.addCallback(feature => {
|
selectedFeature.addCallback(feature => {
|
||||||
if(feature === undefined){
|
if(feature === undefined){
|
||||||
hash.setData("")
|
if(SelectedFeatureHandler._no_trigger_on.indexOf(hash.data) < 0){
|
||||||
|
hash.setData("")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const h = feature?.properties?.id;
|
const h = feature?.properties?.id;
|
||||||
|
|
Loading…
Reference in a new issue