Warn about "on top" option not working on nodes v2.

This commit is contained in:
niknah
2025-12-12 11:32:07 +11:00
parent db1fe29753
commit 7f7e67a7bc
+6 -1
View File
@@ -79,7 +79,7 @@ const circuitBoardLinesExt = {
{ value: 0, text: "Off" },
{ value: 1, text: "Circuit board" },
// On top doesn't place the wires on top of the text boxes
{ value: 2, text: "On top" },
{ value: 2, text: "On top (Does not work in nodes v2)" },
],
defaultValue: 1,
@@ -88,7 +88,12 @@ const circuitBoardLinesExt = {
circuitBoardLines.enabled = (option === 1);
if (app.graph) {
app.graph.config.links_ontop = (option === 2);
if (app.canvas?.graph?.config) {
app.canvas.graph.config.links_ontop = (option === 2);
}
return app.graph.change.apply(app.graph, args);
} else {
console.error('app.graph not available');
}
return null;
},