forked from MapComplete/MapComplete
Merge branch 'develop' into feature/velopark
This commit is contained in:
commit
ac12e85760
4 changed files with 15 additions and 10 deletions
|
@ -130,7 +130,7 @@
|
|||
"minzoom": 15,
|
||||
"pointRendering": [
|
||||
{
|
||||
"marker": [
|
||||
"=marker": [
|
||||
{
|
||||
"icon": "./assets/themes/onwheels/restaurant.svg"
|
||||
}
|
||||
|
@ -231,7 +231,7 @@
|
|||
],
|
||||
"pointRendering": [
|
||||
{
|
||||
"marker": [
|
||||
"=marker": [
|
||||
{
|
||||
"icon": "./assets/themes/onwheels/parking.svg"
|
||||
}
|
||||
|
@ -465,7 +465,7 @@
|
|||
"point",
|
||||
"centroid"
|
||||
],
|
||||
"marker": [
|
||||
"=marker": [
|
||||
{
|
||||
"icon": "./assets/svg/statistics.svg"
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ export class Overpass {
|
|||
return `${this._interpreterUrl}?data=${encodeURIComponent(query)}`
|
||||
}
|
||||
|
||||
public async ExecuteQuery(query: string): Promise<[FeatureCollection, Date]> {
|
||||
private async ExecuteQuery(query: string): Promise<[FeatureCollection, Date]> {
|
||||
const json = await Utils.downloadJson(this.buildUrl(query))
|
||||
|
||||
if (json.elements.length === 0 && json.remark !== undefined) {
|
||||
|
|
|
@ -699,7 +699,7 @@ export class RewriteSpecial extends DesugaringStep<TagRenderingConfigJson> {
|
|||
)
|
||||
}
|
||||
|
||||
private static escapeStr(v: string): string{
|
||||
private static escapeStr(v: string): string {
|
||||
return v
|
||||
.replace(/,/g, "&COMMA")
|
||||
.replace(/\{/g, "&LBRACE")
|
||||
|
@ -770,9 +770,7 @@ export class RewriteSpecial extends DesugaringStep<TagRenderingConfigJson> {
|
|||
* "special":{
|
||||
* "type": "multi",
|
||||
* "key": "_nearby_bicycle_parkings:props",
|
||||
* "tagrendering": {
|
||||
* "*": "<b>{id}</b> ({distance}m) {tagApply(a,b,c)}"
|
||||
* }
|
||||
* "tagrendering": "<b>{id}</b> ({distance}m) {tagApply(a,b,c)}"
|
||||
* }}
|
||||
* const context = ConversionContext.test()
|
||||
* RewriteSpecial.convertIfNeeded(special, context) // => {"*": "{multi(_nearby_bicycle_parkings:props,<b>&LBRACEid&RBRACE</b> &LPARENS&LBRACEdistance&RBRACEm&RPARENS &LBRACEtagApply&LPARENSa&COMMAb&COMMAc&RPARENS&RBRACE)}"}
|
||||
|
@ -877,7 +875,9 @@ export class RewriteSpecial extends DesugaringStep<TagRenderingConfigJson> {
|
|||
}
|
||||
|
||||
if (foundLanguages.size === 0) {
|
||||
const args = argNamesList.map((nm) => RewriteSpecial.escapeStr(special[nm] ?? "")).join(",")
|
||||
const args = argNamesList
|
||||
.map((nm) => RewriteSpecial.escapeStr(special[nm] ?? ""))
|
||||
.join(",")
|
||||
return {
|
||||
"*": `{${type}(${args})}`,
|
||||
}
|
||||
|
|
|
@ -610,6 +610,11 @@ In the case that MapComplete is pointed to the testing grounds, the edit will be
|
|||
* const target = {"id":"test"}
|
||||
* const result = Utils.Merge(source, target)
|
||||
* result // => {"id":"test","condition":{"and":["xyz"]}}
|
||||
*
|
||||
* const source = {"=name": {"en": "XYZ"}}
|
||||
* const target = {"name":null, "x":"y"}
|
||||
* const result = Utils.Merge(source, target)
|
||||
* result // => {"name": {"en": "XYZ"}, "x": "y"}
|
||||
*/
|
||||
static Merge<T, S>(source: Readonly<S>, target: T): T & S {
|
||||
if (target === null) {
|
||||
|
@ -1451,7 +1456,7 @@ In the case that MapComplete is pointed to the testing grounds, the edit will be
|
|||
public static scrollIntoView(element: HTMLBaseElement | HTMLDivElement) {
|
||||
// Is the element completely in the view?
|
||||
const parentRect = Utils.findParentWithScrolling(element)?.getBoundingClientRect()
|
||||
if(!parentRect){
|
||||
if (!parentRect) {
|
||||
return
|
||||
}
|
||||
const elementRect = element.getBoundingClientRect()
|
||||
|
|
Loading…
Reference in a new issue