mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-23 08:02:39 +00:00
fix(menu) when click on ".." show full menu
This commit is contained in:
parent
742ec385e1
commit
ebc09c5be2
1 changed files with 23 additions and 4 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue