From 327e49da42a76aa84d86e7236b95e5490e860a37 Mon Sep 17 00:00:00 2001 From: EllangoK Date: Sat, 8 Apr 2023 11:13:27 -0400 Subject: [PATCH] remove test render link file --- web/extensions/core/colorPalette.js | 2 +- web/scripts/test.js | 71 ----------------------------- 2 files changed, 1 insertion(+), 72 deletions(-) delete mode 100644 web/scripts/test.js diff --git a/web/extensions/core/colorPalette.js b/web/extensions/core/colorPalette.js index 2189e3c2..a04a422b 100644 --- a/web/extensions/core/colorPalette.js +++ b/web/extensions/core/colorPalette.js @@ -462,4 +462,4 @@ function customizeRenderLink(colorPalette) { num_sublines ); }; -} \ No newline at end of file +} diff --git a/web/scripts/test.js b/web/scripts/test.js deleted file mode 100644 index 55f8dfb6..00000000 --- a/web/scripts/test.js +++ /dev/null @@ -1,71 +0,0 @@ -(function() { - var LGraphCanvas = LiteGraph.LGraphCanvas; - var LGraph = LiteGraph.LGraph; - - // Save the original renderLink function - var originalRenderLink = LGraphCanvas.prototype.renderLink; - - // Save the original connect function - var originalConnect = LGraph.prototype.connect; - - // Override the connect function - LGraph.prototype.connect = function ( - origin_slot, - target_slot, - options - ) { - var origin_id = origin_slot[0]; - var target_id = target_slot[0]; - - var origin_node = this.getNodeById(origin_id); - var target_node = this.getNodeById(target_id); - - - if (origin_node && target_node) { - var output_slot = origin_slot[1]; - var output_slot_info = origin_node.getOutputInfo(output_slot); - - - console.log(output_slot_info) - if (output_slot_info) { - options = options || {}; - options.color = output_slot_info.label_color || null; - } - } - - return originalConnect.call(this, origin_slot, target_slot, options); - }; - - // Override the renderLink function - LGraphCanvas.prototype.renderLink = function ( - ctx, - a, - b, - link, - skip_border, - flow, - color, - start_dir, - end_dir, - num_sublines - ) { - if (link && link.color) { - color = link.color; - } - - // Call the original renderLink function with the new color - originalRenderLink.call( - this, - ctx, - a, - b, - link, - skip_border, - flow, - color, - start_dir, - end_dir, - num_sublines - ); - }; -})();