persistence
This commit is contained in:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user