forked from MapComplete/MapComplete
Fix metatag _isOpen, fix clustering zoom behaviour
This commit is contained in:
parent
f897022ba0
commit
a38ab81356
3 changed files with 10 additions and 5 deletions
|
@ -454,7 +454,7 @@ export class InitUiElements {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (z >= clustering.maxZoom) {
|
if (z > clustering.maxZoom) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -209,7 +209,7 @@ export default class SimpleMetaTagger {
|
||||||
configurable: true,
|
configurable: true,
|
||||||
get: () => {
|
get: () => {
|
||||||
delete feature.properties._isOpen
|
delete feature.properties._isOpen
|
||||||
feature.properties._isOpen = ""
|
feature.properties._isOpen = undefined
|
||||||
const tagsSource = State.state.allElements.getEventSourceById(feature.properties.id);
|
const tagsSource = State.state.allElements.getEventSourceById(feature.properties.id);
|
||||||
tagsSource.addCallbackAndRunD(tags => {
|
tagsSource.addCallbackAndRunD(tags => {
|
||||||
if (tags.opening_hours === undefined || tags._country === undefined) {
|
if (tags.opening_hours === undefined || tags._country === undefined) {
|
||||||
|
@ -230,7 +230,8 @@ export default class SimpleMetaTagger {
|
||||||
const oldNextChange = tags["_isOpen:nextTrigger"] ?? 0;
|
const oldNextChange = tags["_isOpen:nextTrigger"] ?? 0;
|
||||||
|
|
||||||
if (oldNextChange > (new Date()).getTime() &&
|
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
|
// Already calculated and should not yet be triggered
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -267,7 +268,7 @@ export default class SimpleMetaTagger {
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
return feature.properties["_isOpen"]
|
return undefined
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,11 @@ export default class SpecialVisualizations {
|
||||||
if (!tags.hasOwnProperty(key)) {
|
if (!tags.hasOwnProperty(key)) {
|
||||||
continue
|
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){
|
for(const key of calculatedTags){
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue