run prettier

This commit is contained in:
Peng Xiao
2022-07-03 21:38:09 +08:00
parent d237837641
commit d00a3dbff2
40 changed files with 213 additions and 125 deletions

View File

@@ -35,7 +35,7 @@ export const EdgeHandle = observer<EdgeHandleProps>(function EdgeHandle({
return (
<rect
pointerEvents={(isHidden || disabled) ? 'none' : 'all'}
pointerEvents={isHidden || disabled ? 'none' : 'all'}
className={'tl-transparent tl-edge-handle ' + (isHidden ? '' : edgeClassnames[edge])}
aria-label={`${edge} target`}
opacity={isHidden ? 0 : 1}

View File

@@ -16,11 +16,11 @@ export function useKeyboardEvents() {
}
window.addEventListener('keydown', onKeyDown)
window.addEventListener('keyup', onKeyUp)
document.addEventListener('paste', (e) => {
document.addEventListener('paste', e => {
e.preventDefault()
app.paste(e)
})
document.addEventListener('copy', (e) => {
document.addEventListener('copy', e => {
e.preventDefault()
app.copy()
})

View File

@@ -46,4 +46,4 @@ export function useMinimapEvents() {
}, [callbacks])
return events
}
}

View File

@@ -20,7 +20,7 @@ export function useSetup<
onDeleteShapes,
onFileDrop,
onPaste,
onCanvasDBClick
onCanvasDBClick,
} = props
React.useLayoutEffect(() => {

View File

@@ -3,5 +3,5 @@ import type { TLReactShape } from './TLReactShape'
import type { TLReactEventMap } from '~types'
export class TLReactApp<S extends TLReactShape = TLReactShape> extends TLApp<S, TLReactEventMap> {
pubEvent?: any
pubEvent?: any
}