From ea8936f2836094553bd8782ae479812df117e886 Mon Sep 17 00:00:00 2001 From: Fedor Katurov Date: Fri, 17 Jan 2020 18:01:33 +0700 Subject: [PATCH] fixed km markers radiuses --- src/map/Router/index.tsx | 2 +- src/styles/map.less | 27 ++++++++++----------------- 2 files changed, 11 insertions(+), 18 deletions(-) diff --git a/src/map/Router/index.tsx b/src/map/Router/index.tsx index 38d8be7..de3b693 100644 --- a/src/map/Router/index.tsx +++ b/src/map/Router/index.tsx @@ -110,7 +110,7 @@ const RouterUnconnected: FC = memo( item.addTo(MainMap); return () => { - item.removeFrom(MainMap); + item.removeFrom(MainMap).remove(); }; }, [dist, end, direction, distance]); diff --git a/src/styles/map.less b/src/styles/map.less index 1d5bed3..41dadd5 100644 --- a/src/styles/map.less +++ b/src/styles/map.less @@ -122,7 +122,7 @@ .leaflet-km-dist { background: @red_secondary; color: white; - border-radius: 4px; + border-radius: 8px; font-size: 12px; text-align: center; min-width: 20px; @@ -155,10 +155,11 @@ .leaflet-km-dist { left: auto; right: -3px; - top: -3px; + top: -2px; position: absolute; z-index: -10; - padding: 2px 16px 2px 4px; + padding: 1px 15px 1px 6px; + border-radius: 10px; &::after { content: ' '; @@ -167,8 +168,8 @@ border-radius: 4px; background: white; position: absolute; - right: 5px; - top: 5px; + right: 4px; + top: 4px; } } @@ -186,7 +187,6 @@ } } - .router-marker { div { background: @router_line; @@ -197,22 +197,15 @@ top: -5px; position: absolute; z-index: -10; - padding: 2px 8px 2px 8px; - border-radius: 4px; + padding: 0 6px 0 6px; + border-radius: 12px; font-weight: bold; } &.right { div { - // padding: 2px 4px 2px 16px; - // left: -3px; - right: auto; - left: 15px; - - // &::after { - // left: 5px; - // right: auto; - // } + right: auto; + left: 15px; } } }