@mocanvas/editor · function

useIsCropping

declare function useIsCropping(shapeId?: ShapeId): boolean

Whether a shape is being cropped — its crop handles are live, so the ordinary resize handles must not be.

SEMANTICS-ASSUMED: mocanvas has no crop tool yet, so "cropping" is read off the state chart by path (select.crop…), which is where a crop tool would live. Until one exists this is always false, which is the correct answer rather than a stub — a caller can already branch on it and will not have to change when cropping lands.

mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.