kopia lustrzana https://github.com/Tldraw/Tldraw
Show bounds when pinching
rodzic
97ae80baa0
commit
e9d070f354
|
@ -11,7 +11,9 @@ import RotateHandle from './rotate-handle'
|
|||
export default function Bounds(): JSX.Element {
|
||||
const isBrushing = useSelector((s) => s.isIn('brushSelecting'))
|
||||
|
||||
const isSelecting = useSelector((s) => s.isIn('selecting'))
|
||||
const shouldDisplay = useSelector((s) =>
|
||||
s.isInAny('selecting', 'selectPinching')
|
||||
)
|
||||
|
||||
const zoom = useSelector((s) => tld.getCurrentCamera(s.data).zoom)
|
||||
|
||||
|
@ -38,7 +40,7 @@ export default function Bounds(): JSX.Element {
|
|||
|
||||
if (!bounds) return null
|
||||
|
||||
if (!isSelecting) return null
|
||||
if (!shouldDisplay) return null
|
||||
|
||||
if (isSingleHandles) return null
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue