feat(phase-13): implement layer groups/folders system
Add comprehensive layer groups system for organizing layers hierarchically. Features: - Create layer groups (folders) - Add layers to groups - Remove layers from groups - Toggle group collapsed/expanded state - Get all layers in a group - Group properties: * groupId: Parent group ID (null if not in group) * isGroup: Whether layer is a group * collapsed: Whether group is collapsed - Groups are special layers with isGroup=true - Groups have no canvas (width/height = 0) - Groups can contain multiple layers - Layers track their parent group via groupId Changes: - Updated types/layer.ts with group properties: * groupId: string | null * isGroup: boolean * collapsed: boolean - Updated store/layer-store.ts: * createLayer initializes group properties * createGroup() - Create new group * addToGroup() - Add layer to group * removeFromGroup() - Remove from group * toggleGroupCollapsed() - Toggle collapsed * getGroupLayers() - Get group's layers 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -59,6 +59,12 @@ export interface Layer {
|
||||
y: number;
|
||||
/** Layer mask for non-destructive editing */
|
||||
mask: LayerMask | null;
|
||||
/** Parent group ID (null if not in a group) */
|
||||
groupId: string | null;
|
||||
/** Whether this layer is a group */
|
||||
isGroup: boolean;
|
||||
/** Whether group is collapsed (only relevant if isGroup=true) */
|
||||
collapsed: boolean;
|
||||
/** Timestamp of creation */
|
||||
createdAt: number;
|
||||
/** Timestamp of last modification */
|
||||
|
||||
Reference in New Issue
Block a user