mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-24 08:29:53 +00:00
refactor(listeners) togglSelect
This commit is contained in:
parent
5e209bff32
commit
2c7245298f
1 changed files with 3 additions and 1 deletions
|
|
@ -216,8 +216,10 @@ function toggleSelect(key, files) {
|
|||
if (!key)
|
||||
throw Error('key should not be undefined!');
|
||||
|
||||
const [file] = files;
|
||||
|
||||
if (isMac && key.meta || key.ctrl)
|
||||
return DOM.toggleSelectedFile(files[0]);
|
||||
return DOM.toggleSelectedFile(file);
|
||||
|
||||
if (key.shift)
|
||||
return files.forEach(DOM.selectFile);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue