kopia lustrzana https://github.com/Tldraw/Tldraw
Update packages/editor/src/lib/hooks/useCoarsePointer.ts
simplify Co-authored-by: Mime Čuvalo <mimecuvalo@gmail.com>pull/3572/head
rodzic
b42487f4ee
commit
6f034baaa5
|
@ -20,10 +20,8 @@ export function useCoarsePointer() {
|
|||
const mql = window.matchMedia('(any-pointer: coarse)')
|
||||
|
||||
const handler = (coarse?: boolean) => {
|
||||
editor.updateInstanceState({ isCoarsePointer: !!mql.matches })
|
||||
if (coarse !== undefined) {
|
||||
editor.updateInstanceState({ isCoarsePointer: coarse })
|
||||
}
|
||||
editor.updateInstanceState({ isCoarsePointer: coarse ?? !!mql.matches })```
|
||||
|
||||
}
|
||||
|
||||
const touchStartHandler = () => handler(true)
|
||||
|
|
Ładowanie…
Reference in New Issue