viz: double click on kernel run goes to codegen (#13147)

This commit is contained in:
qazal
2025-11-08 23:40:50 +08:00
committed by GitHub
parent 8a7fa9e7b4
commit 7250fc0354

View File

@@ -488,12 +488,15 @@ async function renderProfiler() {
}
}
canvas.addEventListener("click", e => {
const clickShape = (e) => {
e.preventDefault();
const foundRect = findRectAtPosition(e.clientX, e.clientY);
if (foundRect?.step != null && foundRect?.key == null) { return switchCtx(foundRect.ctx, foundRect.step); }
if (foundRect?.step != null && (foundRect?.key == null || e.type == "dblclick")) { return switchCtx(foundRect.ctx, foundRect.step); }
if (foundRect?.key != focusedShape) { focusShape(foundRect); }
});
}
canvas.addEventListener("click", clickShape);
canvas.addEventListener("dblclick", clickShape);
canvas.addEventListener("mousemove", e => {
const foundRect = findRectAtPosition(e.clientX, e.clientY);