@@ -17,19 +17,19 @@ function createTabObj(title) {
1717 title,
1818 // snapshots is an array of ALL state snapshots for statefull and stateless components the reactime tab working on a specific user application
1919 snapshots : [ ] ,
20- // gabi :: record initial snapshot to refresh page in case empty function is called
20+ // records initial snapshot to refresh page in case empty function is called
2121 initialSnapshot : [ ] ,
22- // gabi and nate :: index here is the tab index that show total amount of state changes
22+ // index here is the tab index that shows total amount of state changes
2323 index : 0 ,
2424 //* this is our pointer so we know what the current state the user is checking (this accounts for time travel aka when user clicks jump on the UI)
2525 currLocation : null ,
26- // gabi and nate :: point the node that will generate the next child set by newest node or jump
26+ // points the node that will generate the next child set by newest node or jump
2727 currParent : 0 ,
28- // gabi and nate :: points to the current branch
28+ // points to the current branch
2929 currBranch : 0 ,
3030 //* inserting a new property to build out our hierarchy dataset for d3
3131 hierarchy : null ,
32- // gabi :: record initial hierarchy to refresh page in case empty function is called
32+ // records initial hierarchy to refresh page in case empty function is called
3333 initialHierarchy : null ,
3434 mode : {
3535 persist : false ,
@@ -45,13 +45,13 @@ class Node {
4545 // eslint-disable-next-line no-param-reassign
4646 // eslint-disable-next-line no-multi-assign
4747 // eslint-disable-next-line no-plusplus
48- // gabi and nate :: continue the order of number of total state changes
48+ // continues the order of number of total state changes
4949 // eslint-disable-next-line no-plusplus
5050 this . index = tabObj . index ++ ;
51- // gabi and nate :: continue the order of number of states changed from that parent
51+ // continues the order of number of states changed from that parent
5252 // eslint-disable-next-line no-multi-assign
5353 this . name = tabObj . currParent += 1 ;
54- // gabi and nate :: mark from what branch this node is originated
54+ // marks from what branch this node is originated
5555 this . branch = tabObj . currBranch ;
5656 this . stateSnapshot = obj ;
5757 this . children = [ ] ;
@@ -64,23 +64,23 @@ function sendToHierarchy(tabObj, newNode) {
6464 tabObj . hierarchy = newNode ;
6565 } else {
6666 tabObj . currLocation . children . push ( newNode ) ;
67- // gabi and nate :: if the node's children's array is empty
67+ // if the node's children's array is empty
6868 if ( tabObj . currLocation . children . length > 1 ) {
69- // gabi and nate :: increment the value of the nodes branch by 1
69+ // increment the value of the nodes branch by 1
7070 newNode . branch += 1 ;
71- // gabi and nate :: reassign value of current branch the newNode branch value
71+ // reassign value of current branch as the newNode branch value
7272 tabObj . currBranch = newNode . branch ;
7373 }
7474 tabObj . currLocation = newNode ;
7575 }
7676}
7777
7878function changeCurrLocation ( tabObj , rootNode , index , name ) {
79- // gabi and nate :: index comes from the app's main reducer to locate the right current location on tabObj
79+ // index comes from the app's main reducer to locate the right current location on tabObj
8080 // check if current node has the index wanted
8181 if ( rootNode . index === index ) {
8282 tabObj . currLocation = rootNode ;
83- // gabi and nate :: index of current location from where the next node will be a child
83+ // index of current location from where the next node will be a child
8484 tabObj . currParent = name ;
8585 return ;
8686 }
@@ -90,7 +90,7 @@ function changeCurrLocation(tabObj, rootNode, index, name) {
9090 // if not, recurse on each one of the children
9191 }
9292
93- if ( rootNode . children ) { // Carlos: remove if, redundant
93+ if ( rootNode . children ) {
9494 rootNode . children . forEach ( child => {
9595 changeCurrLocation ( tabObj , child , index , name ) ;
9696 } ) ;
0 commit comments