1
0
Fork 0
freesewing/packages/react/components/Xray/point.mjs

22 lines
680 B
JavaScript
Raw Normal View History

2023-09-29 18:20:28 +02:00
// __SDEFILE__ - This file is a dependency for the stand-alone environment
import React from 'react'
// Components
import { Point } from '../pattern/point.mjs'
import { withinPartBounds } from '../pattern/utils.mjs'
export const PointXray = ({ stackName, pointName, part, point, settings, components, t }) => {
// Don't include parts outside the part bounding box
if (!withinPartBounds(point, part)) return null
return (
<>
<Point {...{ stackName, pointName, part, point, settings, components, t }} />
<circle
cx={point.x}
cy={point.y}
r={1.5 * (settings.scale || 1)}
className="stroke-md opacity-70"
/>
</>
)
}