mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-01-10 23:48:01 -05:00
viz: extend main code block to full height (#12944)
This commit is contained in:
@@ -241,6 +241,9 @@
|
||||
max-height: 30vh;
|
||||
padding: 8px;
|
||||
}
|
||||
pre.full-height code.hljs {
|
||||
max-height: none;
|
||||
}
|
||||
#progress-message {
|
||||
position: absolute;
|
||||
z-index: 2;
|
||||
|
||||
@@ -731,8 +731,8 @@ async function main() {
|
||||
if (ret.length === 0) return;
|
||||
renderDag(ret[currentRewrite].graph, ret[currentRewrite].changed_nodes ?? [], currentRewrite === 0);
|
||||
// ** right sidebar code blocks
|
||||
metadata.replaceChildren(codeBlock(step.code_line, "python", { loc:step.loc, wrap:true }),
|
||||
codeBlock(ret[currentRewrite].uop, "python", { wrap:false }));
|
||||
const codeElement = codeBlock(ret[currentRewrite].uop, "python", { wrap:false });
|
||||
metadata.replaceChildren(codeBlock(step.code_line, "python", { loc:step.loc, wrap:true }), codeElement);
|
||||
// ** rewrite steps
|
||||
if (step.match_count >= 1) {
|
||||
const rewriteList = metadata.appendChild(document.createElement("div"));
|
||||
@@ -755,7 +755,7 @@ async function main() {
|
||||
diffCode.className = "wrap";
|
||||
}
|
||||
}
|
||||
}
|
||||
} else codeElement.classList.add("full-height");
|
||||
}
|
||||
|
||||
// **** collapse/expand
|
||||
|
||||
Reference in New Issue
Block a user