@mocanvas/editor · class
declare class MenuManagerThe set of menus that are open, kept in the instance session record so it
survives tool changes, is visible to anything reading the store, and is
reactive: reading getOpenMenus() inside a signal re-runs it on every change.
Ids are opaque strings owned by the UI; nothing here interprets them.
Methods · 6
addOpenMenu(id: string): thisMark a menu as open. Opening an already-open menu changes nothing.
clearOpenMenus(): thisClose every open menu.
constructor(editor: Editor)getOpenMenus(): string[]The open menu ids, in the order they were opened.
isMenuOpen(id: string): booleanremoveOpenMenu(id: string): thisMark a menu as closed. Closing a menu that is not open changes nothing.
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.