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

Function scrollToBrowserStep

apps/visualize-trace/static/js/script.js:1081–1101  ·  view source on GitHub ↗
(parentIndex, browserStepId)

Source from the content-addressed store, hash-verified

1079}
1080
1081function scrollToBrowserStep(parentIndex, browserStepId) {
1082 const browserStepElement = document.getElementById(`browser-step-${parentIndex}-${browserStepId}`);
1083 if (browserStepElement) {
1084 browserStepElement.scrollIntoView({
1085 behavior: 'smooth',
1086 block: 'start'
1087 });
1088
1089 // 更新活跃的导航项
1090 updateActiveNavItem(parentIndex, browserStepId);
1091
1092 // 确保父步骤是展开的
1093 const stepContent = document.getElementById(`step-content-${parentIndex}`);
1094 if (stepContent && !stepContent.classList.contains('show')) {
1095 const collapseInstance = new bootstrap.Collapse(stepContent, {
1096 toggle: false
1097 });
1098 collapseInstance.show();
1099 }
1100 }
1101}
1102
1103function toggleBrowserNav(stepIndex, event) {
1104 event.stopPropagation(); // 阻止事件冒泡

Callers

nothing calls this directly

Calls 1

updateActiveNavItemFunction · 0.85

Tested by

no test coverage detected