]> git.openstreetmap.org Git - rails.git/commitdiff
Keep adjacent page icon width integer
authorAnton Khorev <tony29@yandex.ru>
Sat, 10 Feb 2024 15:04:41 +0000 (18:04 +0300)
committerAnton Khorev <tony29@yandex.ru>
Sat, 10 Feb 2024 15:04:41 +0000 (18:04 +0300)
app/helpers/svg_helper.rb

index 9c02fc1d9e72fa5efca40172debdd16d12aabc81..bc12ff22320dab1c0373beac485d17cbbc607d6d 100644 (file)
@@ -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]