wip(lab): Moved draft to wrapper
This commit is contained in:
parent
e62a862559
commit
153bff0536
11 changed files with 208 additions and 80 deletions
|
@ -1,25 +1,33 @@
|
|||
import { Ul, Li, Details, Summary, NoSumDiv, Deg } from 'shared/components/workbench/menu'
|
||||
import { formatMm } from 'shared/utils.js'
|
||||
import Attributes from './attributes.js'
|
||||
import Ops from './path-ops.js'
|
||||
/*
|
||||
* Things to add
|
||||
*
|
||||
* ops
|
||||
*/
|
||||
|
||||
const XrayPath = ({ pathName, partName, draft, t, units }) => {
|
||||
const path = draft?.parts?.[partName]?.paths?.[pathName]
|
||||
|
||||
const XrayPath = ({ path }) => (
|
||||
<Ul>
|
||||
<Li>
|
||||
<NoSumDiv>
|
||||
<Deg />
|
||||
<span className="font-bold mr-2">Render =</span>
|
||||
<span>{JSON.stringify(path.render)}</span>
|
||||
</NoSumDiv>
|
||||
</Li>
|
||||
<Attributes attr={path.attributes} />
|
||||
<Ops ops={path.ops} />
|
||||
</Ul>
|
||||
)
|
||||
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>
|
||||
)
|
||||
}
|
||||
|
||||
export default XrayPath
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue