forked from MapComplete/MapComplete
Add QR-code to all popups, add direction indicator to popup and visual feedback, make reviews accessible to screenreaders (both to read them and to make them)
This commit is contained in:
parent
5567869bb4
commit
bfd818cb38
33 changed files with 415 additions and 98 deletions
|
@ -99,6 +99,7 @@ export default class Constants {
|
|||
* In seconds
|
||||
*/
|
||||
static zoomToLocationTimeout = 15
|
||||
public static readonly viewportCenterCloseToGpsCutoff: number = 20
|
||||
private static readonly config = (() => {
|
||||
const defaultConfig = packagefile.config
|
||||
return { ...defaultConfig, ...extraconfig }
|
||||
|
|
|
@ -576,6 +576,7 @@ export class AddEditingElements extends DesugaringStep<LayerConfigJson> {
|
|||
"last_edit",
|
||||
"favourite_state",
|
||||
"all_tags",
|
||||
"qr_code",
|
||||
]
|
||||
private readonly _desugaring: DesugaringContext
|
||||
|
||||
|
@ -657,6 +658,13 @@ export class AddEditingElements extends DesugaringStep<LayerConfigJson> {
|
|||
})
|
||||
}
|
||||
|
||||
if (!usedSpecialFunctions.has("qr_code")) {
|
||||
json.tagRenderings.push({
|
||||
id: "qr_code",
|
||||
render: { "*": "{qr_code()}" },
|
||||
})
|
||||
}
|
||||
|
||||
if (!usedSpecialFunctions.has("all_tags")) {
|
||||
const trc: QuestionableTagRenderingConfigJson = {
|
||||
id: "all-tags",
|
||||
|
|
|
@ -631,6 +631,10 @@ export default class TagRenderingConfig {
|
|||
* , "testcase")
|
||||
* config.constructChangeSpecification(undefined, undefined, [false, true, false], {amenity: "public_bookcase"}) // => new And([new Tag("books","adults")])
|
||||
*
|
||||
* const config = new TagRenderingConfig({"id":"capacity", "render": "Fits {capcity} books",freeform: {"key":"capacity",type:"pnat"} })
|
||||
* config.constructChangeSpecification("", undefined, undefined, {}) // => undefined
|
||||
* config.constructChangeSpecification("5", undefined, undefined, {}).optimize() // => new Tag("capacity", "5")
|
||||
*
|
||||
* @param freeformValue The freeform value which will be applied as 'freeform.key'. Ignored if 'freeform.key' is not set
|
||||
*
|
||||
* @param singleSelectedMapping (Only used if multiAnswer == false): the single mapping to apply. Use (mappings.length) for the freeform
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue