diff --git a/src/components/FeaturePanel/Climbing/Editor/RoutePath.tsx b/src/components/FeaturePanel/Climbing/Editor/RoutePath.tsx index 45634b1f8..052df892e 100644 --- a/src/components/FeaturePanel/Climbing/Editor/RoutePath.tsx +++ b/src/components/FeaturePanel/Climbing/Editor/RoutePath.tsx @@ -38,11 +38,13 @@ export const RoutePath = ({ route, routeNumber }) => { const machine = getMachine(); const path = getPathForRoute(route); if (!path) return null; - const pointsInString = path.map(({ x, y }, index) => { - const position = getPixelPosition({ x, y, units: 'percentage' }); + const pointsInString = path + .map(({ x, y }, index) => { + const position = getPixelPosition({ x, y, units: 'percentage' }); - return `${index === 0 ? 'M' : 'L'}${position.x} ${position.y} `; - }); + return `${index === 0 ? 'M' : 'L'}${position.x} ${position.y} `; + }) + .join(''); const onMouseMove = (e, segmentIndex: number) => { if ( diff --git a/src/components/FeaturePanel/Climbing/Editor/RoutesLayer.tsx b/src/components/FeaturePanel/Climbing/Editor/RoutesLayer.tsx index 07d6fea76..f0b0cc0c9 100644 --- a/src/components/FeaturePanel/Climbing/Editor/RoutesLayer.tsx +++ b/src/components/FeaturePanel/Climbing/Editor/RoutesLayer.tsx @@ -188,6 +188,7 @@ export const RoutesLayer = ({ $imageSize={imageSize} $isVisible={isVisible} $transformOrigin={transformOrigin} + xmlns="http://www.w3.org/2000/svg" > {sortedRoutes.rest.map((item) => item.route)} {sortedRoutes.rest.map((item) => item.marks)}