diff --git a/client/modules/menu.js b/client/modules/menu.js index b65eccb7..a51af6f4 100644 --- a/client/modules/menu.js +++ b/client/modules/menu.js @@ -68,21 +68,40 @@ function MenuProto(Position) { return { x: position.x, y: position.y, - } + }; if (Position) return { x: Position.x, y: Position.y, - } + }; if (position) return { x: position.x, y: position.y, - } + }; return getCurrentPosition(); - }; + } + + function getMenuNameByEl(el) { + if (!el) + return 'context'; + + const name = DOM.getCurrentName(el); + + if (name === '..') + return 'context'; + + return 'contextFile'; + } + + function getMenuByName(name) { + if (name === 'context') + return MenuContext; + + return MenuContextFile; + } function getMenuNameByEl(el) { if (!el)