1
0
Fork 0
freesewing/packages/freesewing.shared/components/workbench/menu/xray/path.js

34 lines
919 B
JavaScript
Raw Normal View History

import { Ul, Li, Details, Summary, NoSumDiv, Deg } from 'shared/components/workbench/menu'
2022-01-30 15:14:44 +01:00
import { formatMm } from 'shared/utils.js'
import Attributes from './attributes.js'
import Ops from './path-ops.js'
2022-01-29 19:27:14 +01:00
2022-01-30 15:14:44 +01:00
const XrayPath = ({ pathName, partName, draft, t, units }) => {
const path = draft?.parts?.[partName]?.paths?.[pathName]
2022-01-29 18:24:36 +01:00
2022-01-30 15:14:44 +01:00
return (
<Ul>
<Attributes attr={path.attributes} />
<Li>
<NoSumDiv>
<Deg />
<span className="font-bold mr-2">path.render =</span>
<span>{JSON.stringify(path.render)}</span>
</NoSumDiv>
</Li>
<Li>
<NoSumDiv>
<Deg />
<span className="font-bold mr-2">path.length() =</span>
<span dangerouslySetInnerHTML={{
__html: formatMm(path.length(), units)
}} />
</NoSumDiv>
</Li>
<Ops ops={path.ops} />
</Ul>
)
}
2022-01-29 18:24:36 +01:00
export default XrayPath