mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-27 22:18:11 +08:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user