Add panel drag resize ctrl

This commit is contained in:
2022-03-01 14:16:14 +08:00
parent 1238bb71bd
commit 38b7f1850e
6 changed files with 246 additions and 47 deletions
+32 -28
View File
@@ -6,7 +6,7 @@ import { Entry } from "../Entry/Entry";
import { StatusProvider, Status } from "@Context/Status";
import { ClassicRenderer } from "@GLRender/ClassicRenderer";
import { initializeIcons } from '@fluentui/font-icons-mdl2';
import { Container } from "@Component/Container/Container";
import { RootContainer } from "@Component/Container/RootContainer";
import { LayoutDirection } from "@Model/Layout";
import "./SimulatorWeb.scss";
import { CommandBar } from "@Component/CommandBar/CommandBar";
@@ -55,6 +55,36 @@ class SimulatorWeb extends Component {
(window as any).s = this;
}
public componentDidMount() {
this.setting.layout.setData({
items: [
{
items: [
{panles: ["Label A", "Label Aa Bb", "Label aaa"]},
{
items: [{panles: ["Label b", "Label bbb"]}, {panles: ["C"]}],
scale: 80,
layout: LayoutDirection.X
}
],
scale: 60,
layout: LayoutDirection.Y
},
{
items: [{
panles: ["Label d"]
}, {
items: [{panles: ["Label e", "ee"]}, {panles: ["F"]}],
layout: LayoutDirection.Y
}],
layout: LayoutDirection.Y
}
],
scale: 60,
layout: LayoutDirection.X
})
}
public render(): ReactNode {
return <SettingProvider value={this.setting}>
<StatusProvider value={this.status}>
@@ -74,33 +104,7 @@ class SimulatorWeb extends Component {
height: `calc( 100% - ${45}px)`
}}>
<CommandBar width={45}/>
<Container items={[
{
items: [
{panles: ["Label A", "Label Aa Bb", "Label aaa"]},
{
items: [{panles: ["Label b", "Label bbb"]}, {panles: ["C"]}],
scale: 80,
layout: LayoutDirection.X
}
],
scale: 60,
layout: LayoutDirection.Y
},
{
items: [{
panles: ["Label d"]
}, {
items: [{panles: ["Label e", "ee"]}, {panles: ["F"]}],
layout: LayoutDirection.Y
}],
layout: LayoutDirection.Y
}
]}
scale={60}
layout={LayoutDirection.X}
isRoot={true}
/>
<RootContainer />
</div>
</Theme>
}