From 6fb960a57b32f41a7344842f2f61c0b9b7b6c3fc Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 5 Dec 2023 01:30:40 +0800 Subject: [PATCH] Add debug icon to node group --- render-process/RegisterNode.ts | 14 ++++++++++++++ static/icons/Debug.svg | 1 + 2 files changed, 15 insertions(+) create mode 100644 static/icons/Debug.svg diff --git a/render-process/RegisterNode.ts b/render-process/RegisterNode.ts index bda884e..952803c 100644 --- a/render-process/RegisterNode.ts +++ b/render-process/RegisterNode.ts @@ -131,6 +131,20 @@ export default function (settings: Settings) { name: "node-icon", }); + // debug + if (cfg.debug) { + group.addShape("image", { + attrs: { + x: x0 + 182, + y: y0 + 2, + height: 14, + width: 14, + img: `./static/icons/Debug.svg`, + }, + name: "node-icon", + }); + } + // name text group.addShape("text", { attrs: { diff --git a/static/icons/Debug.svg b/static/icons/Debug.svg new file mode 100644 index 0000000..59c05ab --- /dev/null +++ b/static/icons/Debug.svg @@ -0,0 +1 @@ + \ No newline at end of file