MCPcopy Create free account
hub / github.com/MiroMindAI/MiroThinker / scrollToStep

Function scrollToStep

apps/visualize-trace/static/js/script.js:1059–1079  ·  view source on GitHub ↗
(stepIndex)

Source from the content-addressed store, hash-verified

1057}
1058
1059function scrollToStep(stepIndex) {
1060 const stepElement = document.getElementById(`step-${stepIndex}`);
1061 if (stepElement) {
1062 stepElement.scrollIntoView({
1063 behavior: 'smooth',
1064 block: 'start'
1065 });
1066
1067 // 更新活跃的导航项
1068 updateActiveNavItem(stepIndex);
1069
1070 // 如果步骤是收起的,自动展开
1071 const stepContent = document.getElementById(`step-content-${stepIndex}`);
1072 if (stepContent && !stepContent.classList.contains('show')) {
1073 const collapseInstance = new bootstrap.Collapse(stepContent, {
1074 toggle: false
1075 });
1076 collapseInstance.show();
1077 }
1078 }
1079}
1080
1081function scrollToBrowserStep(parentIndex, browserStepId) {
1082 const browserStepElement = document.getElementById(`browser-step-${parentIndex}-${browserStepId}`);

Callers

nothing calls this directly

Calls 1

updateActiveNavItemFunction · 0.85

Tested by

no test coverage detected