We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4c0be3c + 2c20c56 commit ae67cfaCopy full SHA for ae67cfa
1 file changed
media/programflow-visualization/webview.js
@@ -65,7 +65,18 @@ function updateVisualization(traceElem) {
65
`;
66
const viz = document.getElementById("viz");
67
viz.innerHTML = data;
68
- viz.scrollTo(0, viz.scrollHeight);
+
69
+ // Scroll to the end of the stack
70
+ const frames = document.getElementById("frames");
71
+ if (frames.lastElementChild !== null) {
72
+ const framesHeight = frames.lastElementChild.offsetTop + frames.lastElementChild.offsetHeight;
73
+ var y = framesHeight - viz.clientHeight;
74
+ if (y < 0) {
75
+ y = 0;
76
+ }
77
+ viz.scrollTo(0, y);
78
79
80
const stdoutLog = document.getElementById("stdout-log");
81
stdoutLog.innerHTML = traceElem[4];
82
stdoutLog.scrollTo(0, stdoutLog.scrollHeight);
0 commit comments