fix(key) ALT + LEFT/RIGHT: one panel mode

This commit is contained in:
coderaiser 2016-11-06 19:25:23 +02:00
parent 668561f006
commit 551584d7e9
2 changed files with 25 additions and 20 deletions

View file

@ -1528,9 +1528,10 @@ var CloudCmd, Util, DOM, CloudFunc;
},
this.duplicatePanel = function() {
var isDir = CurrentInfo.isDir,
path = CurrentInfo.dirPath,
panel = CurrentInfo.panelPassive;
var isDir = CurrentInfo.isDir;
var path = CurrentInfo.dirPath;
var panel = CurrentInfo.panelPassive;
var noCurrent = !CurrentInfo.isOnePanel;
if (isDir)
path = CurrentInfo.path;
@ -1538,7 +1539,7 @@ var CloudCmd, Util, DOM, CloudFunc;
CloudCmd.loadDir({
path: path,
panel: panel,
noCurrent: true
noCurrent: noCurrent,
});
};

View file

@ -391,25 +391,29 @@ var CloudCmd, Util, DOM;
break;
case Key.LEFT:
if (alt) {
name = Info.panel.getAttribute('data-name');
if (name === 'js-right') {
DOM.duplicatePanel();
event.preventDefault();
}
}
if (!alt)
return;
event.preventDefault();
name = Info.panel.getAttribute('data-name');
if (name === 'js-right')
DOM.duplicatePanel();
break;
case Key.RIGHT:
if (alt) {
name = Info.panel.getAttribute('data-name');
if (name === 'js-left') {
DOM.duplicatePanel();
event.preventDefault();
}
}
if (!alt)
return;
event.preventDefault();
name = Info.panel.getAttribute('data-name');
if (name === 'js-left')
DOM.duplicatePanel();
break;
/* in case of pressing button 'Home', *