@mocanvas/mocanvas · function
declare function useCanApplySelectionAction(): booleanWhether an action that edits the selection can run: the editor is writable and at least one selected shape is unlocked.
The two halves are checked together because either alone is misleading — a writable editor with a locked selection, or an unlocked selection in a read-only editor, both mean "no".
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.