import {forwardRef} from 'react' import Path from '../path' import Point from '../point' import Snippet from '../snippet' import { getProps } from '../utils' import { round } from 'shared/utils' import { Tr, KeyTd, ValTd, Attributes, pointCoords } from '../path/index' const partInfo = (props) => (
Part info
Name{props.partName}Width{round(props.part.width,2)}mmHeight{round(props.part.height,2)}mmTop Left{pointCoords(props.part.topLeft)}Bottom Right{pointCoords(props.part.bottomRight)}Attributes
{props.gist?.only && props.gist.only.length > 0 ? ( ) : ( )}
) const XrayPart = props => { const { topLeft, bottomRight } = props.part return ( { evt.stopPropagation(); props.showInfo(partInfo(props)) }} /> ) } export const PartInner = forwardRef((props, ref) => { const { partName, part, gist } = props const Grid = gist.paperless ? ( ) : null return ( {Grid} { gist._state?.xray?.enabled && } {Object.keys(part.paths).map((pathName) => ( ))} {Object.keys(props.part.points).map((pointName) => ( ))} {Object.keys(props.part.snippets).map((snippetName) => ( ))} ) }) const Part = props => { const { partName, part} = props return ( ) } /* */ export default Part