mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-27 17:08:13 +08:00
Polish node graph frames and rename them for clarity (#1104)
* Polish layer panel UI and layer type icons/text * Assorted UI text and comment cleanup * Insert Transform node before Imaginate node via tool * Rename "Node Graph Frame" to Layer type and Frame tool * Rename "Node Graph Frame" to "Frame" tool * Update Node Graph Frame -> Frame tool icon * Fix lint warnings
This commit is contained in:
@@ -58,7 +58,7 @@ export async function initWasm(): Promise<void> {
|
||||
|
||||
// Import the WASM module JS bindings and wrap them in the panic proxy
|
||||
// eslint-disable-next-line import/no-cycle
|
||||
wasmImport = await import("@graphite/../wasm/pkg").then(panicProxy);
|
||||
wasmImport = await import("@graphite/../wasm/pkg");
|
||||
|
||||
// Provide a random starter seed which must occur after initializing the WASM module, since WASM can't generate its own random numbers
|
||||
const randomSeedFloat = Math.floor(Math.random() * Number.MAX_SAFE_INTEGER);
|
||||
|
||||
@@ -745,7 +745,7 @@ export class LayerMetadata {
|
||||
selected!: boolean;
|
||||
}
|
||||
|
||||
export type LayerType = "Imaginate" | "NodeGraphFrame" | "Folder" | "Image" | "Shape" | "Text";
|
||||
export type LayerType = "Folder" | "NodeGraphFrame" | "Text";
|
||||
|
||||
export type LayerTypeData = {
|
||||
name: string;
|
||||
@@ -754,11 +754,8 @@ export type LayerTypeData = {
|
||||
|
||||
export function layerTypeData(layerType: LayerType): LayerTypeData | undefined {
|
||||
const entries: Record<string, LayerTypeData> = {
|
||||
Imaginate: { name: "Imaginate", icon: "NodeImaginate" },
|
||||
NodeGraphFrame: { name: "Node Graph Frame", icon: "NodeNodes" },
|
||||
Folder: { name: "Folder", icon: "NodeFolder" },
|
||||
Image: { name: "Image", icon: "NodeImage" },
|
||||
Shape: { name: "Shape", icon: "NodeShape" },
|
||||
NodeGraphFrame: { name: "Layer", icon: "Layer" },
|
||||
Folder: { name: "Folder", icon: "Folder" },
|
||||
Text: { name: "Text", icon: "NodeText" },
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user