Skip to content

Commit

Permalink
ClimbingEditor: Fix Firefox bug (#655)
Browse files Browse the repository at this point in the history
  • Loading branch information
jvaclavik authored Oct 9, 2024
1 parent 61a8cbf commit 9cd5eaf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/components/FeaturePanel/Climbing/Editor/RoutePath.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)}
Expand Down

0 comments on commit 9cd5eaf

Please sign in to comment.