separate print layout from draft layout. add better buttons
This commit is contained in:
parent
236f35f765
commit
1a65a16e56
16 changed files with 246 additions and 112 deletions
|
@ -1,4 +1,4 @@
|
|||
import React from 'react'
|
||||
import {forwardRef} from 'react'
|
||||
import Path from '../path'
|
||||
import Point from '../point'
|
||||
import Snippet from '../snippet'
|
||||
|
@ -85,7 +85,7 @@ const XrayPart = props => {
|
|||
)
|
||||
}
|
||||
|
||||
export const PartInner = props => {
|
||||
export const PartInner = forwardRef((props, ref) => {
|
||||
const { partName, part, gist } = props
|
||||
|
||||
const grid = gist.paperless ? (
|
||||
|
@ -99,7 +99,7 @@ export const PartInner = props => {
|
|||
/>
|
||||
) : null
|
||||
|
||||
return (<>
|
||||
return (<g ref={ref}>
|
||||
{grid}
|
||||
{
|
||||
gist._state?.xray?.enabled &&
|
||||
|
@ -133,14 +133,15 @@ export const PartInner = props => {
|
|||
{...props}
|
||||
/>
|
||||
))}
|
||||
</>)
|
||||
}
|
||||
</g>)
|
||||
})
|
||||
|
||||
const Part = props => {
|
||||
const { partName, part} = props
|
||||
|
||||
return (
|
||||
<g {...getProps(part)} id={`part-${partName}`}>
|
||||
{PartInner(props)}
|
||||
<PartInner {...props}/>
|
||||
</g>
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue