fix
This commit is contained in:
@@ -171,6 +171,7 @@ const useDocumentDrag = () => {
|
||||
|
||||
const rotation = simulationState.rotation;
|
||||
layoutRef.current.set(docId, { ...entry, rotation });
|
||||
markLayoutDirty?.();
|
||||
|
||||
const node = itemRefs.current.get(docId);
|
||||
if (node) {
|
||||
@@ -185,7 +186,7 @@ const useDocumentDrag = () => {
|
||||
const isSettled = Math.abs(angularVelocity) < SETTLE_ANGULAR_VELOCITY;
|
||||
return isSettled;
|
||||
},
|
||||
[itemRefs, layoutRef],
|
||||
[itemRefs, layoutRef, markLayoutDirty],
|
||||
);
|
||||
|
||||
const startInertiaAnimation = useCallback(
|
||||
@@ -627,6 +628,8 @@ const useDocumentDrag = () => {
|
||||
item.displayRotation += (item.targetRotation - item.displayRotation) * rotationBlend;
|
||||
}
|
||||
|
||||
markLayoutDirty?.();
|
||||
|
||||
const entryItem = layoutRef.current.get(item.docId) || {};
|
||||
layoutRef.current.set(item.docId, {
|
||||
...entryItem,
|
||||
@@ -780,6 +783,8 @@ const useDocumentDrag = () => {
|
||||
const pointerInsideCard =
|
||||
Math.abs(pointerLocalX) <= halfWidth && Math.abs(pointerLocalY) <= halfHeight;
|
||||
|
||||
markLayoutDirty?.();
|
||||
|
||||
const currentTimestamp =
|
||||
typeof event.timeStamp === 'number' && Number.isFinite(event.timeStamp)
|
||||
? event.timeStamp
|
||||
@@ -829,6 +834,7 @@ const useDocumentDrag = () => {
|
||||
recalcVisibleDocIds,
|
||||
debugDrag,
|
||||
onDocumentStackSelect,
|
||||
markLayoutDirty,
|
||||
],
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user