From: Anton Khorev Date: Sat, 10 Feb 2024 15:04:41 +0000 (+0300) Subject: Keep adjacent page icon width integer X-Git-Tag: live~947^2~3 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/b685f6eb2edb5ee7171bc000853dd5980c6bf68b Keep adjacent page icon width integer --- diff --git a/app/helpers/svg_helper.rb b/app/helpers/svg_helper.rb index 9c02fc1d9..bc12ff223 100644 --- a/app/helpers/svg_helper.rb +++ b/app/helpers/svg_helper.rb @@ -44,7 +44,7 @@ module SvgHelper height = 15 pad = 2 segment = (0.5 * height) - pad - width = segment + (2 * pad) + width = (segment + (2 * pad)).ceil path_data = "M#{side * (pad - (0.5 * width))},#{pad} l#{side * segment},#{segment} l#{-side * segment},#{segment}" path_tag = tag.path :d => path_data, :fill => "none", :stroke => "currentColor", :"stroke-width" => 1.5 tag.svg path_tag, :width => width, :height => height, :viewBox => "-#{0.5 * width} 0 #{width} #{height}", :class => options[:class]