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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user