Skip to content

Commit 0596f03

Browse files
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.
1 parent fc68a9f commit 0596f03

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

web/debugger.mjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,14 @@ class Stepper {
374374
table.classList.add("showText");
375375
decArgs.append(table);
376376
table.append(charCodeRow, fontCharRow, unicodeRow);
377+
} else if (fn === "constructPath") {
378+
const [op, [path], minMax] = args;
379+
decArgs = this.#c("td");
380+
decArgs.append(JSON.stringify(this.#simplifyArgs(path)));
381+
decArgs.append(this.#c("br"));
382+
decArgs.append(`minMax: ${JSON.stringify(this.#simplifyArgs(minMax))}`);
383+
decArgs.append(this.#c("br"));
384+
decArgs.append(`→ ${opMap[op]}`);
377385
} else if (fn === "restore" && this.indentLevel > 0) {
378386
this.indentLevel--;
379387
}

0 commit comments

Comments
 (0)