persistence

This commit is contained in:
2025-11-02 15:34:26 +01:00
parent 4f296ac1e3
commit 866a31b89d
3 changed files with 142 additions and 20 deletions
+15 -12
View File
@@ -33,6 +33,7 @@ const useDocumentDrag = () => {
onDocumentOpen,
onInspectDocument,
selectedDocumentIds,
markLayoutDirty,
} = useDesktopContext();
const applyTransform = useCallback(
@@ -74,18 +75,20 @@ const useDocumentDrag = () => {
rotation,
});
applyTransform(
item.docId,
centerX,
centerY,
item.width,
item.height,
rotation,
item.docId === dragState.docKey ? dragState.dragScale || 1 : 1,
);
});
},
[applyTransform, layoutRef],
applyTransform(
item.docId,
centerX,
centerY,
item.width,
item.height,
rotation,
item.docId === dragState.docKey ? dragState.dragScale || 1 : 1,
);
});
markLayoutDirty?.();
},
[applyTransform, layoutRef, markLayoutDirty],
);
const tapHandler = usePointerTap({