@mocanvas/editor · function

getFocusedGroupId

declare function getFocusedGroupId(editor: Editor): ShapeId | PageId

The container gestures are currently scoped to: a group that has been drilled into, or the current page when none has.

Returning the page id rather than null for the unfocused case is what lets callers use the result directly as a parent id — the overwhelmingly common thing to do with it.

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.