mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-06-24 02:14:17 +00:00
viz: double click on kernel run goes to codegen (#13147)
This commit is contained in:
parent
8a7fa9e7b4
commit
7250fc0354
1 changed files with 6 additions and 3 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue