|
@@ -1,5 +1,5 @@
|
|
|
-import { TLApp, TLStateEvents, TLToolState } from '@tldraw/core'
|
|
|
-import type { TLReactEventMap } from '@tldraw/react'
|
|
|
+import { TLApp, TLCursor, TLToolState } from '@tldraw/core'
|
|
|
+import type { TLReactEventMap, TLReactEvents } from '@tldraw/react'
|
|
|
import type { Shape } from '~lib/shapes'
|
|
|
import type { LogseqPortalTool } from '../LogseqPortalTool'
|
|
|
|
|
@@ -10,10 +10,15 @@ export class IdleState extends TLToolState<
|
|
|
LogseqPortalTool
|
|
|
> {
|
|
|
static id = 'idle'
|
|
|
+ cursor = TLCursor.Cross
|
|
|
|
|
|
onEnter = ({ quick }: { quick: boolean } = { quick: false }) => {
|
|
|
if (quick) {
|
|
|
- this.tool.transition('creating', { quick })
|
|
|
+ this.tool.transition('creating')
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ onPointerDown: TLReactEvents<Shape>['pointer'] = (e) => {
|
|
|
+ this.tool.transition('creating')
|
|
|
+ }
|
|
|
}
|