mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
chore(dom) swapPanels: es2015-ify
This commit is contained in:
parent
4dc5f6a249
commit
02a19fecbf
1 changed files with 16 additions and 14 deletions
|
|
@ -1376,15 +1376,18 @@ function CmdProto() {
|
|||
});
|
||||
};
|
||||
|
||||
this.swapPanels = function() {
|
||||
var Info = CurrentInfo,
|
||||
panel = Info.panel,
|
||||
panelPassive = Info.panelPassive,
|
||||
|
||||
currentIndex = [].indexOf.call(Info.files, Info.element),
|
||||
|
||||
dirPath = DOM.getCurrentDirPath(),
|
||||
dirPathPassive = DOM.getNotCurrentDirPath();
|
||||
this.swapPanels = () => {
|
||||
const Info = CurrentInfo;
|
||||
const {panel} = Info;
|
||||
const {files} = Info;
|
||||
const {element} = Info;
|
||||
|
||||
const panelPassive = Info.panelPassive;
|
||||
|
||||
const dirPath = DOM.getCurrentDirPath();
|
||||
const dirPathPassive = DOM.getNotCurrentDirPath();
|
||||
|
||||
let currentIndex = files.indexOf(element);
|
||||
|
||||
CloudCmd.loadDir({
|
||||
path: dirPath,
|
||||
|
|
@ -1395,15 +1398,14 @@ function CmdProto() {
|
|||
CloudCmd.loadDir({
|
||||
path: dirPathPassive,
|
||||
panel: panel
|
||||
}, function() {
|
||||
var el,
|
||||
files = Info.files,
|
||||
length = files.length - 1;
|
||||
}, () => {
|
||||
const files = Info.files;
|
||||
const length = files.length - 1;
|
||||
|
||||
if (currentIndex > length)
|
||||
currentIndex = length;
|
||||
|
||||
el = files[currentIndex];
|
||||
const el = files[currentIndex];
|
||||
|
||||
DOM.setCurrentFile(el);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue