Small bug fixes

This commit is contained in:
Pieter Vander Vennet 2020-11-24 11:10:43 +01:00
parent 4d2e8b6f24
commit 488fd16873
9 changed files with 51 additions and 14 deletions

2
Svg.ts
View file

@ -194,7 +194,7 @@ export default class Svg {
public static search_svg() { return new FixedUiElement(Svg.search);}
public static search_ui() { return new FixedUiElement(Svg.search_img);}
public static share = " <svg xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:svg=\"http://www.w3.org/2000/svg\" xmlns=\"http://www.w3.org/2000/svg\" id=\"svg8\" version=\"1.1\" viewBox=\"0 0 20.06869 19.489862\" height=\"73.662468\" width=\"75.850166\"> <defs id=\"defs2\" /> <metadata id=\"metadata5\"> <rdf:RDF> <cc:Work rdf:about=\"\"> <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\" /> <dc:title></dc:title> </cc:Work> </rdf:RDF> </metadata> <g transform=\"translate(-3.3314588,-273.65084)\" id=\"layer1\"> <path id=\"path819\" d=\"m 19.212364,278.17517 -11.9689358,5.52059 11.9388628,5.50669\" style=\"fill: none !important;stroke-width:2.43863511;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;stroke:#000000\" /> <circle r=\"3.9119694\" cy=\"283.69574\" cx=\"7.2434282\" id=\"path820\" style=\"fill-opacity:1;stroke:none;stroke-width:0.53329796;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1\" /> <circle r=\"3.9119689\" cy=\"289.22873\" cx=\"19.48818\" id=\"path820-3\" style=\"fill-opacity:1;stroke:none;stroke-width:0.53329796;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.97014926\" /> <circle r=\"3.9119689\" cy=\"277.56281\" cx=\"19.48818\" id=\"path820-3-6\" style=\"fill-opacity:1;stroke:none;stroke-width:0.53329796;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1\" /> </g> </svg> "
public static share = " <svg xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:svg=\"http://www.w3.org/2000/svg\" xmlns=\"http://www.w3.org/2000/svg\" id=\"svg8\" version=\"1.1\" viewBox=\"0 0 20.06869 19.489862\" height=\"73.662468\" width=\"75.850166\"> <defs id=\"defs2\" /> <metadata id=\"metadata5\"> <rdf:RDF> <cc:Work rdf:about=\"\"> <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\" /> <dc:title></dc:title> </cc:Work> </rdf:RDF> </metadata> <g transform=\"translate(-3.3314588,-273.65084)\" id=\"layer1\"> <path id=\"path819\" d=\"m 19.212364,278.17517 -11.9689358,5.52059 11.9388628,5.50669\" style=\"fill:none !important;stroke-width:2.43863511;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;stroke:#000000\" /> <circle r=\"3.9119694\" cy=\"283.69574\" cx=\"7.2434282\" id=\"path820\" style=\"fill-opacity:1;stroke:none;stroke-width:0.53329796;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1\" /> <circle r=\"3.9119689\" cy=\"289.22873\" cx=\"19.48818\" id=\"path820-3\" style=\"fill-opacity:1;stroke:none;stroke-width:0.53329796;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.97014926\" /> <circle r=\"3.9119689\" cy=\"277.56281\" cx=\"19.48818\" id=\"path820-3-6\" style=\"fill-opacity:1;stroke:none;stroke-width:0.53329796;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1\" /> </g> </svg> "
public static share_img = Img.AsImageElement(Svg.share)
public static share_svg() { return new FixedUiElement(Svg.share);}
public static share_ui() { return new FixedUiElement(Svg.share_img);}

View file

@ -6,6 +6,7 @@ import QuestionBox from "./QuestionBox";
import Combine from "../Base/Combine";
import TagRenderingAnswer from "./TagRenderingAnswer";
import State from "../../State";
import {FixedUiElement} from "../Base/FixedUiElement";
export class FeatureInfoBox extends UIElement {
private _tags: UIEventSource<any>;
@ -46,7 +47,8 @@ export class FeatureInfoBox extends UIElement {
.SetClass("featureinfobox-titlebar"),
new Combine([
...this._renderings,
this._questionBox
this._questionBox,
new FixedUiElement("").SetClass("featureinfobox-tail")
]
).SetClass("featureinfobox-content"),
]).SetClass("featureinfobox")

View file

@ -22,7 +22,6 @@ export default class ShareButton extends UIElement{
super.InnerUpdate(htmlElement);
const self= this;
htmlElement.addEventListener('click', () => {
alert("URL:" + self._shareData.url)
if (navigator.share) {
navigator.share(self._shareData).then(() => {
console.log('Thanks for sharing!');

View file

@ -95,7 +95,8 @@
"condition": "operator=De Fietsambassade Gent"
},
"wikipedialink",
"osmlink"
"osmlink",
"sharelink"
],
"tagRenderings": [
"images",
@ -174,6 +175,34 @@
}
]
},
{
"question": {
"nl": "Wanneer is dit fietsherstelpunt open?",
"en": "When is this bicycle repair point opened?"
},
"render": "{opening_hours_table()}",
"freeform": {
"key": "opening_hours",
"type": "opening_hours"
},
"mappings": [
{
"if": "opening_hours=24/7",
"then": {
"nl": "Dag en nacht open",
"en": "Always opened"
}
},
{
"if": "opening_hours=",
"then": {
"nl": "Dag en nacht open",
"en": "Always opened"
},
"hideInAnswer": true
}
]
},
{
"question": {
"en": "Does this bike repair station have a special tool to repair your bike chain?",

View file

@ -30,7 +30,7 @@
<path
id="path819"
d="m 19.212364,278.17517 -11.9689358,5.52059 11.9388628,5.50669"
style="fill:none;stroke-width:2.43863511;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;stroke:#000000" />
style="fill:none !important;stroke-width:2.43863511;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;stroke:#000000" />
<circle
r="3.9119694"
cy="283.69574"

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View file

@ -9,7 +9,7 @@
]
},
"wikipedialink": {
"render": "<a href='https://wikipedia.org/wiki/{wikipedia}' target='_blank'><img src='./assets/wikipedia.svg' alt='WP'/></a>",
"render": "<a href='https://wikipedia.org/wiki/{wikipedia}' target='_blank'><img src='./assets/svg/wikipedia.svg' alt='WP'/></a>",
"condition": "wikipedia~*"
},
"phonelink": {

View file

@ -8,7 +8,7 @@
}
.fullscreenmessage-content .featureinfobox {
padding: 1em;
padding-top: 1em;
position: relative;
}
@ -34,6 +34,12 @@
}
.fullscreenmessage-content .featureinfobox-tail {
display: block;
height: 1em;
}
.to-the-map span {
font-size: xx-large;
}

View file

@ -28,10 +28,11 @@
}
.featureinfobox-content {
display:block;
display: block;
max-height: 75vh;
overflow-y: auto;
overflow-x: hidden;
padding-top: 1em;
}
@media only screen and (max-width: 600px), only screen and (max-height: 600px) {
.featureinfobox-content {

View file

@ -521,16 +521,16 @@ a {
width: 1.5em;
padding: 0.5em;
padding-left: 0.4em;
fill: var(--subtle-detail-color-contrast);
stroke: var(--subtle-detail-color-contrast);
fill: var(--subtle-detail-color-contrast) !important;
stroke: var(--subtle-detail-color-contrast) !important;
}
.share-button svg path{
fill: var(--subtle-detail-color-contrast);
stroke: var(--subtle-detail-color-contrast);
fill: var(--subtle-detail-color-contrast) !important;
stroke: var(--subtle-detail-color-contrast) !important;
}
.share-button svg circle{
fill: var(--subtle-detail-color-contrast);
stroke: var(--subtle-detail-color-contrast);
fill: var(--subtle-detail-color-contrast) !important;
stroke: var(--subtle-detail-color-contrast) !important;
}