1
0
Fork 0
freesewing/sites/shared/components/workbench/menu/xray/point.js

26 lines
683 B
JavaScript
Raw Normal View History

2022-07-12 20:47:39 +02:00
import { Ul, Li, NoSumDiv, Deg } from 'shared/components/workbench/menu'
2022-06-17 12:02:09 +02:00
import { round } from 'shared/utils'
import Attributes from './attributes'
2022-01-29 19:27:14 +01:00
2022-01-30 15:14:44 +01:00
const XrayPoint = ({ pointName, partName, draft, t }) => {
const point = draft?.parts?.[partName]?.points?.[pointName]
return point
? (
<Ul>
{['x', 'y'].map(coord => (
<Li key={coord}>
<NoSumDiv>
<Deg />
<span className="font-bold mr-2">{coord} =</span>
<span>{round(point[coord])}</span>
</NoSumDiv>
</Li>
))}
<Attributes attr={point.attributes} t={t} />
</Ul>
) : null
}
2022-01-29 19:27:14 +01:00
export default XrayPoint