mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: set input/output draggable
This commit is contained in:
6 files changed
+19
-49
No files matched your search
@@ -67,6 +67,7 @@ export default function ScratchpadContainer() {
|
||||
const ui = useSelector<any, any>((state) => state.ui, _.isEqual);
|
||||
|
||||
const handleChangeSize = _.debounce(() => {
|
||||
ctx.scratchpad.editor?.layout?.();
|
||||
$('#scratchpad').trigger('vjScratchpadRelayout');
|
||||
forceUpdate();
|
||||
}, 500);
|
||||
@@ -77,12 +78,10 @@ export default function ScratchpadContainer() {
|
||||
});
|
||||
};
|
||||
|
||||
const showSidebar = Object.keys(pages).length > 1;
|
||||
|
||||
return (
|
||||
<Allotment onChange={handleChangeSize}>
|
||||
<Allotment.Pane visible={showSidebar} minSize={50} maxSize={50}>
|
||||
<div className="scratchpad__tablist" style={{ display: showSidebar ? 'block' : 'none' }}>
|
||||
<Allotment.Pane visible={Object.keys(pages).length > 1} minSize={50} maxSize={50}>
|
||||
<div className="scratchpad__tablist">
|
||||
{Object.keys(pages).map((key) => {
|
||||
const Component = pages[key].icon;
|
||||
return (
|
||||
|
||||
Reference in new issue
Block a user