feat: Add initial random rotation for cards, introduce a PointerTrackingContext for pointer management, and include a design document for spatial workspace architecture.

This commit is contained in:
2025-11-26 22:42:16 +01:00
parent 0c6504ef1c
commit 07e28b3f8d
7 changed files with 177 additions and 23 deletions
+2 -2
View File
@@ -335,7 +335,7 @@ export class LayoutStore {
}, ref);
// Calculate initial position using the card instance
const { x: initX, y: initY } = getInitialPosition(
const { x: initX, y: initY, rotation: initRotation } = getInitialPosition(
this.containerWidth,
this.containerHeight,
card,
@@ -343,7 +343,7 @@ export class LayoutStore {
);
// Update card with calculated position
card.update({ x: initX, y: initY }, { markDirty: true });
card.update({ x: initX, y: initY, rotation: initRotation }, { markDirty: true });
}
this.items.set(id, card);