zoom in, out, percentage, save & width nodes

This commit is contained in:
Guy Ben-Aharon
2024-08-22 18:36:10 +03:00
parent 05bd822627
commit e4ee415e6d
13 changed files with 183 additions and 22 deletions

View File

@@ -46,6 +46,16 @@ export const ChartDBProvider: React.FC<React.PropsWithChildren> = ({
]
);
const updateDiagramUpdatedAt: ChartDBContext['updateDiagramUpdatedAt'] =
useCallback(async () => {
const updatedAt = new Date();
setDiagramUpdatedAt(updatedAt);
await db.updateDiagram({
id: diagramId,
attributes: { updatedAt },
});
}, [db, diagramId, setDiagramUpdatedAt]);
const updateDatabaseType: ChartDBContext['updateDatabaseType'] =
useCallback(
async (databaseType) => {
@@ -906,12 +916,12 @@ export const ChartDBProvider: React.FC<React.PropsWithChildren> = ({
updateDiagramName,
loadDiagram,
updateDatabaseType,
updateDiagramUpdatedAt,
createTable,
addTable,
getTable,
removeTable,
updateTable,
// updateTables,
updateTablesState,
updateField,
removeField,