mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-04-29 03:00:14 -04:00
viz: double click on kernel run goes to codegen (#13147)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user