mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-17 23:38:06 +08:00
Layer selection (#166)
* Change arg to IconButton component * Add basic layer selection mechanism * Clean up print statements and add some comments * Simplified the layer selection mechanism * Remove redundant rule for 'no-param-reassign' * Clean up frontend and and plumb selection flow to backend * Update eslintrc Co-authored-by: Dennis Kobert <dennis@kobert.dev>
This commit is contained in:
committed by
GitHub
parent
8fa4b86d48
commit
981f138812
@@ -118,19 +118,30 @@ export interface LayerPanelEntry {
|
||||
name: string;
|
||||
visible: boolean;
|
||||
layer_type: LayerType;
|
||||
collapsed: boolean;
|
||||
path: BigUint64Array;
|
||||
layer_data: LayerData;
|
||||
}
|
||||
function newLayerPanelEntry(input: any): LayerPanelEntry {
|
||||
return {
|
||||
name: input.name,
|
||||
visible: input.visible,
|
||||
layer_type: newLayerType(input.layer_type),
|
||||
collapsed: input.collapsed,
|
||||
layer_data: newLayerData(input.layer_data),
|
||||
path: new BigUint64Array(input.path.map((n: number) => BigInt(n))),
|
||||
};
|
||||
}
|
||||
|
||||
export interface LayerData {
|
||||
expanded: boolean;
|
||||
selected: boolean;
|
||||
}
|
||||
function newLayerData(input: any): LayerData {
|
||||
return {
|
||||
expanded: input.expanded,
|
||||
selected: input.selected,
|
||||
};
|
||||
}
|
||||
|
||||
export enum LayerType {
|
||||
Folder = "Folder",
|
||||
Shape = "Shape",
|
||||
|
||||
Reference in New Issue
Block a user