lint fixes
This commit is contained in:
parent
18f588dc99
commit
3676c7af07
6 changed files with 13 additions and 12 deletions
|
@ -67,4 +67,6 @@ const SvgWrapper = forwardRef((props, ref) => {
|
|||
)
|
||||
})
|
||||
|
||||
SvgWrapper.displayName = 'SvgWrapper'
|
||||
|
||||
export default SvgWrapper
|
||||
|
|
|
@ -32,7 +32,7 @@ export const handleExport = async (format, gist, design, t, app, onComplete, onE
|
|||
app.startLoading()
|
||||
|
||||
// get a worker going
|
||||
const worker = new Worker(new URL('./export-worker.js', import.meta.url), { type: module })
|
||||
const worker = new Worker(new URL('./export-worker.js', import.meta.url), { type: 'module' })
|
||||
|
||||
// listen for the worker's message back
|
||||
worker.addEventListener('message', (e) => {
|
||||
|
@ -56,7 +56,6 @@ export const handleExport = async (format, gist, design, t, app, onComplete, onE
|
|||
app.stopLoading()
|
||||
})
|
||||
|
||||
let svg = ''
|
||||
// pdf settings
|
||||
const settings = {
|
||||
...defaultPdfSettings,
|
||||
|
|
|
@ -56,9 +56,6 @@ const Stack = (props) => {
|
|||
|
||||
const stackLayout = layout.stacks?.[stackName]
|
||||
|
||||
// // Don't just assume this makes sense
|
||||
if (typeof stackLayout?.move?.x === 'undefined') return null
|
||||
|
||||
// Use a ref for direct DOM manipulation
|
||||
const stackRef = useRef(null)
|
||||
const centerRef = useRef(null)
|
||||
|
@ -82,6 +79,9 @@ const Stack = (props) => {
|
|||
handleDrag(select(stackRef.current))
|
||||
}, [rotate, stackRef, stackLayout])
|
||||
|
||||
// // Don't just assume this makes sense
|
||||
if (typeof stackLayout?.move?.x === 'undefined') return null
|
||||
|
||||
// These are kept as vars because re-rendering on drag would kill performance
|
||||
// Managing the difference between re-render and direct DOM updates makes this
|
||||
// whole thing a bit tricky to wrap your head around
|
||||
|
@ -144,7 +144,7 @@ const Stack = (props) => {
|
|||
didDrag = true
|
||||
setTransforms()
|
||||
})
|
||||
.on('end', function (event) {
|
||||
.on('end', function () {
|
||||
// save to gist if anything actually changed
|
||||
if (didDrag) updateLayout()
|
||||
|
||||
|
@ -152,7 +152,7 @@ const Stack = (props) => {
|
|||
})
|
||||
|
||||
/** reset the part's transforms */
|
||||
const resetPart = (event) => {
|
||||
const resetPart = () => {
|
||||
rotation = 0
|
||||
flipX = 0
|
||||
flipY = 0
|
||||
|
|
|
@ -13,7 +13,7 @@ const PrintLayout = (props) => {
|
|||
// disable xray
|
||||
useEffect(() => {
|
||||
if (props.gist?._state?.xray?.enabled) props.updateGist(['_state', 'xray', 'enabled'], false)
|
||||
}, [])
|
||||
})
|
||||
|
||||
const { t } = useTranslation(['workbench'])
|
||||
const [error, setError] = useState(false)
|
||||
|
@ -45,8 +45,8 @@ const PrintLayout = (props) => {
|
|||
props.design,
|
||||
t,
|
||||
props.app,
|
||||
(e) => setError(false),
|
||||
(e) => setError(true)
|
||||
() => setError(false),
|
||||
() => setError(true)
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@ const doScanForBlanks = (stacks, layout, x, y, w, h) => {
|
|||
const basePlugin = ({
|
||||
sheetWidth,
|
||||
sheetHeight,
|
||||
boundary = false,
|
||||
// boundary = false,
|
||||
partName = 'pages',
|
||||
responsiveColumns = true,
|
||||
printStyle = false,
|
||||
|
|
|
@ -7,10 +7,10 @@ import ExportIcon from 'shared/components/icons/export'
|
|||
import { useTranslation } from 'next-i18next'
|
||||
|
||||
const PrintLayoutSettings = (props) => {
|
||||
const { t } = useTranslation(['workbench'])
|
||||
let pages = props.draft?.setStores[0].get('pages')
|
||||
if (!pages) return null
|
||||
const { cols, rows, count } = pages
|
||||
const { t } = useTranslation(['workbench'])
|
||||
|
||||
const setMargin = (evt) => {
|
||||
props.updateGist(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue