UNPKG

tldraw

Version:

A tiny little drawing editor.

26 lines (25 loc) 610 B
import { StateNode } from "@tldraw/editor"; class PointingCrop extends StateNode { static id = "pointing_crop"; onCancel() { this.editor.setCurrentTool("select.crop.idle", {}); } onPointerMove(info) { if (this.editor.inputs.getIsDragging()) { this.startDragging(info); } } onLongPress(info) { this.startDragging(info); } onPointerUp(info) { this.editor.setCurrentTool("select.crop.idle", info); } startDragging(info) { this.editor.setCurrentTool("select.crop.translating_crop", info); } } export { PointingCrop }; //# sourceMappingURL=PointingCrop.mjs.map