[openstreetmap/openstreetmap-website] Store routing icons separately (PR #6189)
Marwin Hochfelsner
notifications at github.com
Sun Jul 13 11:01:48 UTC 2025
@hlfan commented on this pull request.
> @@ -0,0 +1,23 @@
+module OpenStreetMap
+ class SvgCurrentColorTransform < InlineSvg::CustomTransformation
+ def transform(doc)
+ doc.xpath("//@fill|//@stroke").each do |attr|
+ attr.value = "currentColor" if attr.value.strip.downcase == value
+ end
+ doc
+ end
+ end
+
+ class SvgToSymbolTransform < InlineSvg::CustomTransformation
+ def transform(doc)
+ with_svg(doc) do |svg|
+ svg.name = "symbol"
Yes, I've noticed. Currently writing a test for the sprite rendering correctly in `directions_controller_test.rb` because I don't have a better idea of where to put it.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6189#discussion_r2203339247
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/6189/review/3014109749 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250713/f3be5498/attachment.htm>
More information about the rails-dev
mailing list