Fix metatag _isOpen, fix clustering zoom behaviour

This commit is contained in:
pietervdvn 2021-10-11 23:28:51 +02:00
parent f897022ba0
commit a38ab81356
3 changed files with 10 additions and 5 deletions

View file

@ -454,7 +454,7 @@ export class InitUiElements {
return false;
}
if (z >= clustering.maxZoom) {
if (z > clustering.maxZoom) {
return true
}

View file

@ -209,7 +209,7 @@ export default class SimpleMetaTagger {
configurable: true,
get: () => {
delete feature.properties._isOpen
feature.properties._isOpen = ""
feature.properties._isOpen = undefined
const tagsSource = State.state.allElements.getEventSourceById(feature.properties.id);
tagsSource.addCallbackAndRunD(tags => {
if (tags.opening_hours === undefined || tags._country === undefined) {
@ -230,7 +230,8 @@ export default class SimpleMetaTagger {
const oldNextChange = tags["_isOpen:nextTrigger"] ?? 0;
if (oldNextChange > (new Date()).getTime() &&
tags["_isOpen:oldvalue"] === tags["opening_hours"]) {
tags["_isOpen:oldvalue"] === tags["opening_hours"]
&& tags["_isOpen"] !== undefined) {
// Already calculated and should not yet be triggered
return false;
}
@ -267,7 +268,7 @@ export default class SimpleMetaTagger {
}
})
return feature.properties["_isOpen"]
return undefined
}
})

View file

@ -55,7 +55,11 @@ export default class SpecialVisualizations {
if (!tags.hasOwnProperty(key)) {
continue
}
parts.push([key, tags[key] ?? "<b>undefined</b>"]);
let v = tags[key]
if(v === ""){
v = "<b>empty string</b>"
}
parts.push([key, v ?? "<b>undefined</b>"]);
}
for(const key of calculatedTags){