ui: set input/output draggable

This commit is contained in:
undefined committed 2023-03-01 15:04:58 +08:00
1 parent fe1d964eba
commit 909c5a785f
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 (