mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
feature(dom) resize: set current file on left panel, when right panel is active on resizing, and size is to small for two panels
This commit is contained in:
parent
ff471d0ba4
commit
bd7259cfe4
1 changed files with 12 additions and 0 deletions
|
|
@ -22,6 +22,7 @@ var Util, DOM, CloudFunc, CloudCmd;
|
|||
dragndrop();
|
||||
unload();
|
||||
pop();
|
||||
resize();
|
||||
};
|
||||
|
||||
this.initKeysPanel = function() {
|
||||
|
|
@ -296,6 +297,17 @@ var Util, DOM, CloudFunc, CloudCmd;
|
|||
});
|
||||
}
|
||||
|
||||
function resize() {
|
||||
Events.add('resize', function() {
|
||||
var is = window.innerWidth < CloudCmd.MIN_ONE_PANEL_WIDTH,
|
||||
name = Info.panel.getAttribute('data-name'),
|
||||
isLeft = name === 'js-left';
|
||||
|
||||
if (is && !isLeft)
|
||||
DOM.changePanel();
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
})(Util, DOM, CloudFunc, CloudCmd);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue