Skip to content

Commit 36dfdd2

Browse files
authored
Merge pull request #28 from oslabs-beta/d3-empty-fix
Empty button updated to support new chart
2 parents 75317ac + e5ba7ee commit 36dfdd2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/app/reducers/mainReducer.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,12 @@ export default (state, action) => produce(state, draft => {
6969
tabs[currentTab].viewIndex = -1;
7070
tabs[currentTab].playing = false;
7171
tabs[currentTab].snapshots.splice(1);
72+
// reset children in root node to reset graph
73+
tabs[currentTab].hierarchy.children = [];
74+
// reassigning pointer to the appropriate node to branch off of
75+
tabs[currentTab].currLocation = tabs[currentTab].hierarchy;
76+
// reset index
77+
tabs[currentTab].index = 0;
7278
break;
7379
}
7480
case types.SET_PORT: {

0 commit comments

Comments
 (0)