[openstreetmap/openstreetmap-website] Remove controls sprite (PR #5752)
Holger Jeromin
notifications at github.com
Thu Mar 6 07:23:02 UTC 2025
@HolgerJeromin commented on this pull request.
> + $(L.SVG.create("svg"))
+ .append(
+ $(L.SVG.create("path")).attr("d", "M3 1s9 7 9 7c-1.056.587-2.112 1.173-3.168 1.76l3.031 6.615c.346.753.015 1.643-.738 1.989-.753.345-1.643.014-1.989-.739L6.201 11.221C5.134 11.814 4.067 12.407 3 13V1z"),
+ $(L.SVG.create("text")).text("?").attr({
+ "x": "12.5",
+ "y": "18.512",
+ "font-family": "Helvetica, sans-serif",
+ "font-weight": "Bold",
+ "font-size": "12"
+ })
+ )
+ .attr("fill", "currentColor")
+ .attr("class", "h-100 w-100")
+ .appendTo(link);
Is this easier to read?
```suggestion
$(`<svg>
<path d="M3 1s9 7 9 7c-1.056.587-2.112 1.173-3.168 1.76l3.031 6.615c.346.753.015 1.643-.738 1.989-.753.345-1.643.014-1.989-.739L6.201 11.221C5.134 11.814 4.067 12.407 3 13V1z" />
<text "x": "12.5" "y": "18.512"
"font-family"="Helvetica, sans-serif" "font-weight"="Bold" "font-size"="12"
"class"="h-100 w-100"
"fill"="currentColor"
>?</text></svg>`)
.appendTo(link);
```
Probably easier to process by the browser...
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5752#pullrequestreview-2663551805
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5752/review/2663551805 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250305/878f22ee/attachment.htm>
More information about the rails-dev
mailing list