fix(dom) getPanel: when no currentFile panel is undefined

This commit is contained in:
coderaiser 2015-06-30 07:39:56 -04:00
parent ef0fb11a23
commit 161a363b04

View file

@ -1238,11 +1238,17 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
* @param options = {active: true}
*/
this.getPanel = function(options) {
var dataName = 'js-',
current = this.getCurrentFile(),
var files, panel, isLeft,
dataName = 'js-',
current = this.getCurrentFile();
if (!current) {
panel = this.getByDataName('left');
} else {
files = current.parentElement,
panel = files.parentElement,
isLeft = panel.getAttribute('data-name') === 'js-left';
}
/* if {active : false} getting passive panel */
if (options && !options.active) {