mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-19 01:17:18 +00:00
feature(listeners) toggleSelect only when left mouse button
This commit is contained in:
parent
5b8a83c398
commit
3e52f7f954
1 changed files with 5 additions and 3 deletions
|
|
@ -255,6 +255,7 @@ var Util, DOM, CloudFunc, CloudCmd;
|
|||
function setCurrentFileByEvent(event) {
|
||||
var fromName,
|
||||
toName,
|
||||
BUTTON_LEFT = 0,
|
||||
files = [],
|
||||
key = {
|
||||
ctrl: event.ctrlKey,
|
||||
|
|
@ -268,12 +269,13 @@ var Util, DOM, CloudFunc, CloudCmd;
|
|||
DOM.setCurrentFile(element);
|
||||
toName = Info.name;
|
||||
|
||||
if (key.shift)
|
||||
if (key.shift)
|
||||
files = getFilesRange(fromName, toName);
|
||||
else
|
||||
files.push(Info.element);
|
||||
|
||||
toggleSelect(key, files);
|
||||
|
||||
if (event.button === BUTTON_LEFT)
|
||||
toggleSelect(key, files);
|
||||
}
|
||||
|
||||
function getFilesRange(from, to) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue