{
  "version": 3,
  "sources": ["../../../../src/lib/tools/HandTool/HandTool.ts"],
  "sourcesContent": ["import { EASINGS, StateNode, TLClickEventInfo, TLStateNodeConstructor } from '@tldraw/editor'\nimport { Dragging } from './childStates/Dragging'\nimport { Idle } from './childStates/Idle'\nimport { OneFingerZooming } from './childStates/OneFingerZooming'\nimport { Pointing } from './childStates/Pointing'\n\n/** @public */\nexport class HandTool extends StateNode {\n\tstatic override id = 'hand'\n\tstatic override initial = 'idle'\n\tstatic override isLockable = false\n\tstatic override children(): TLStateNodeConstructor[] {\n\t\treturn [Idle, Pointing, Dragging, OneFingerZooming]\n\t}\n\n\toverride onDoubleClick(info: TLClickEventInfo) {\n\t\tswitch (info.phase) {\n\t\t\tcase 'settle-down': {\n\t\t\t\t// A double-tap whose second press is still held down: begin one-finger\n\t\t\t\t// drag-to-zoom. This is a touch gesture, so only enter it on a coarse pointer.\n\t\t\t\tif (this.editor.getInstanceState().isCoarsePointer) {\n\t\t\t\t\tthis.transition('one_finger_zooming', info)\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tcase 'settle-up': {\n\t\t\t\t// A double-tap whose second press was released: zoom in by one step.\n\t\t\t\tconst currentScreenPoint = this.editor.inputs.getCurrentScreenPoint()\n\t\t\t\tthis.editor.zoomIn(currentScreenPoint, {\n\t\t\t\t\tanimation: { duration: 220, easing: EASINGS.easeOutQuint },\n\t\t\t\t})\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n}\n"],
  "mappings": "AAAA,SAAS,SAAS,iBAA2D;AAC7E,SAAS,gBAAgB;AACzB,SAAS,YAAY;AACrB,SAAS,wBAAwB;AACjC,SAAS,gBAAgB;AAGlB,MAAM,iBAAiB,UAAU;AAAA,EACvC,OAAgB,KAAK;AAAA,EACrB,OAAgB,UAAU;AAAA,EAC1B,OAAgB,aAAa;AAAA,EAC7B,OAAgB,WAAqC;AACpD,WAAO,CAAC,MAAM,UAAU,UAAU,gBAAgB;AAAA,EACnD;AAAA,EAES,cAAc,MAAwB;AAC9C,YAAQ,KAAK,OAAO;AAAA,MACnB,KAAK,eAAe;AAGnB,YAAI,KAAK,OAAO,iBAAiB,EAAE,iBAAiB;AACnD,eAAK,WAAW,sBAAsB,IAAI;AAAA,QAC3C;AACA;AAAA,MACD;AAAA,MACA,KAAK,aAAa;AAEjB,cAAM,qBAAqB,KAAK,OAAO,OAAO,sBAAsB;AACpE,aAAK,OAAO,OAAO,oBAAoB;AAAA,UACtC,WAAW,EAAE,UAAU,KAAK,QAAQ,QAAQ,aAAa;AAAA,QAC1D,CAAC;AACD;AAAA,MACD;AAAA,IACD;AAAA,EACD;AACD;",
  "names": []
}
