Skip to content

Commit

Permalink
Fix display bug in workstation for group nodes (#325)
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickG1014 authored Jul 8, 2024
1 parent e73b9b8 commit 8af3524
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/agentscope/studio/static/js/workstation.js
Original file line number Diff line number Diff line change
Expand Up @@ -962,11 +962,15 @@ function hideShowGroupNodes(groupId, show) {
groupInfo.data.elements.forEach(elementNodeId => {
const elementNode = document.getElementById(`node-${elementNodeId}`);
const childNodeInfo = editor.getNodeFromId(elementNodeId);
const contentBox = elementNode.querySelector('.box') ||
elementNode.querySelector('.box-highlight');
if (elementNode) {
elementNode.style.display = show ? '' : 'none';
}
if (childNodeInfo.class === 'GROUP') {
hideShowGroupNodes(elementNodeId, show);
if (!show || (contentBox && !contentBox.classList.contains('hidden'))) {
hideShowGroupNodes(elementNodeId, show);
}
}
});
}
Expand Down Expand Up @@ -2037,4 +2041,4 @@ function showSurveyModal() {

function hideSurveyModal() {
document.getElementById("surveyModal").style.display = "none";
}
}

0 comments on commit 8af3524

Please sign in to comment.