From 0596f03d4e606d90120aa8a8f2441774fae29ffd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Mon, 19 May 2025 19:33:14 +0200 Subject: [PATCH] Show the op dispatched by constructPath in the debugger The `constructPath` op receives as arguments not only the information to construct the path, but also the op to apply the path to (such as "fill", or "stroke"). This commit updates the Stepper tool in the debugger to decode that op, showing its name rather than just its numeric ID. --- web/debugger.mjs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/web/debugger.mjs b/web/debugger.mjs index c85b31f7a..ba0186925 100644 --- a/web/debugger.mjs +++ b/web/debugger.mjs @@ -374,6 +374,14 @@ class Stepper { table.classList.add("showText"); decArgs.append(table); table.append(charCodeRow, fontCharRow, unicodeRow); + } else if (fn === "constructPath") { + const [op, [path], minMax] = args; + decArgs = this.#c("td"); + decArgs.append(JSON.stringify(this.#simplifyArgs(path))); + decArgs.append(this.#c("br")); + decArgs.append(`minMax: ${JSON.stringify(this.#simplifyArgs(minMax))}`); + decArgs.append(this.#c("br")); + decArgs.append(`→ ${opMap[op]}`); } else if (fn === "restore" && this.indentLevel > 0) { this.indentLevel--; }