new style layout

This commit is contained in:
codetypes committed 2025-03-21 13:22:13 +08:00
1 parent 195028b62c
commit bc8ee05844
8 files changed
+116 -56

No files matched your search

+6 -2
View File
@@ -943,9 +943,13 @@ export const Editor: FC<EditorProps> = ({ onUpdate: updateState, data: editor, .
layout: {
type: "compactBox",
direction: "LR",
getHGap: () => 60,
getHGap: () => 30,
getWidth: (d: TreeGraphData) => {
return 160;
if (d.size) {
return d.size[0];
} else {
return 200;
}
},
getHeight: (d: TreeGraphData) => {
if (d.size) {