Add layer locked toggle icon and context menu entry to node graph (#3855)

* Add layer locked toggle icon and context menu entry to node graph

* Simplify logic
This commit is contained in:
Keavon Chambers
2026-03-04 06:30:04 +00:00
committed by GitHub
parent 54a02dedd5
commit 8a75c0c1e1
6 changed files with 130 additions and 8 deletions
+17 -1
View File
@@ -178,9 +178,25 @@ export type FrontendClickTargets = {
readonly modifyImportExport: string[];
};
type ContextMenuDataCreateNode = {
type: "CreateNode";
data: {
compatibleType: string | undefined;
};
};
type ContextMenuDataModifyNode = {
type: "ModifyNode";
data: {
nodeId: bigint;
canBeLayer: boolean;
currentlyIsNode: boolean;
hasSelectedLayers: boolean;
allSelectedLayersLocked: boolean;
};
};
export type ContextMenuInformation = {
contextMenuCoordinates: XY;
contextMenuData: { type: "CreateNode"; data: { compatibleType: string | undefined } } | { type: "ModifyNode"; data: { canBeLayer: boolean; currentlyIsNode: boolean; nodeId: bigint } };
contextMenuData: ContextMenuDataCreateNode | ContextMenuDataModifyNode;
};
export class UpdateContextMenuInformation extends JsMessage {