From b082bea6adbc647047edcfb13219cb48bd9bc962 Mon Sep 17 00:00:00 2001 From: HarutoHiroki Date: Sun, 6 Oct 2024 20:45:12 -0500 Subject: [PATCH] fixing recolor button --- assets/js/graphtool.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/assets/js/graphtool.js b/assets/js/graphtool.js index b79b322..3825c91 100644 --- a/assets/js/graphtool.js +++ b/assets/js/graphtool.js @@ -2549,7 +2549,12 @@ d3.json(typeof PHONE_BOOK !== "undefined" ? PHONE_BOOK doc.select("#recolor").on("click", function () { allPhones.forEach(p => { if (!p.isTarget) { delete p.id; } }); phoneNumber = 0; nextPN = null; - activePhones.forEach(p => { if (!p.isTarget) { p.id = getPhoneNumber(); } }); + activePhones.forEach(p => { + if (!p.isTarget) { + p.id = getPhoneNumber(); + p.hexColor = hclToHex(getCurveColor(p.id,0)); + } + }); colorPhones(); });