2023-09-29 18:20:28 +02:00
|
|
|
// __SDEFILE__ - This file is a dependency for the stand-alone environment
|
2023-06-17 13:19:09 +02:00
|
|
|
// 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"
|
|
|
|
/>
|
|
|
|
</>
|
|
|
|
)
|
|
|
|
}
|