Pin/Unpin all selected nodes on context menu (#136)

This commit is contained in:
Chenlei Hu
2024-09-12 14:09:24 +09:00
committed by GitHub
parent a452beb916
commit 56d3e084af

View File

@@ -6164,7 +6164,6 @@ const globalExport = {};
node.graph.afterChange( /*?*/);
}
static onMenuNodePin(value, options, e, menu, node) {
node.pin();
}
static onMenuNodeMode(value, options, e, menu, node) {
new LiteGraph.ContextMenu(
@@ -13173,7 +13172,13 @@ const globalExport = {};
options.push(
{
content: node.pinned ? "Unpin" : "Pin",
callback: LGraphCanvas.onMenuNodePin
callback: (...args) => {
LGraphCanvas.onMenuNodePin(...args);
for (const i in this.selected_nodes) {
const node = this.selected_nodes[i]
node.pin()
}
}
},
{
content: "Colors",