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.
This commit is contained in:
Nicolò Ribaudo 2025-05-19 19:33:14 +02:00
parent fc68a9f3ee
commit 0596f03d4e
No known key found for this signature in database
GPG Key ID: AAFDA9101C58F338

View File

@ -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--;
}