mirror of
https://github.com/stackrender/stackrender.git
synced 2026-09-10 19:25:44 +00:00
Obsidian theme developed
This commit is contained in:
+8
-2
@@ -16,7 +16,10 @@ const adjustTablesPositions = async (
|
||||
): Promise<TableType[]> => {
|
||||
|
||||
// Extract tables (same as before)
|
||||
const tables: TableType[] = nodes.map((node: Node) => node.data.table) as TableType[];
|
||||
const tables: TableType[] = nodes.map((node: Node) => (
|
||||
{ ...node.data.table as TableType }
|
||||
)) as TableType[];
|
||||
|
||||
|
||||
// Build the ELK graph structure
|
||||
const graph = {
|
||||
@@ -37,7 +40,7 @@ const adjustTablesPositions = async (
|
||||
targets: [rel.targetTableId],
|
||||
})),
|
||||
};
|
||||
|
||||
console.log (graph.children ) ;
|
||||
// Run ELK layout (async)
|
||||
const layoutedGraph = await elk.layout(graph);
|
||||
|
||||
@@ -56,6 +59,9 @@ const adjustTablesPositions = async (
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const isTablesOverlapping = (tableA: TableType, tableB: TableType) => {
|
||||
const tableAWidth: number = 224;
|
||||
const tableAHeight: number = tableA.fields.length * 32 + 36;
|
||||
|
||||
Reference in New Issue
Block a user