We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fa6f127 commit e296baeCopy full SHA for e296bae
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