You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/app/containers/ActionContainer.tsx
+5-6Lines changed: 5 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,7 @@ import VerticalSlider from '../components/TimeTravel/VerticalSlider';
14
14
This file renders the 'ActionContainer'. The action container is the leftmost column in the application. It includes the button that shrinks and expands the action container, a dropdown to select the active site, a clear button, the current selected Route, and a list of selectable snapshots with timestamps.
15
15
*/
16
16
17
+
17
18
// resetSlider locates the rc-slider elements on the document and resets it's style attributes
@@ -54,6 +55,7 @@ function ActionContainer(props: ActionContainerProps): JSX.Element {
54
55
children?: [];
55
56
}
56
57
*/
58
+
57
59
58
60
constdisplayArray=(obj: Obj): void=>{
59
61
if(
@@ -82,6 +84,7 @@ function ActionContainer(props: ActionContainerProps): JSX.Element {
82
84
if(obj.children){
83
85
// if argument has a 'children' array, we iterate through it and run 'displayArray' on each element
84
86
obj.children.forEach((element): void=>{
87
+
//recursive call
85
88
displayArray(element);
86
89
});
87
90
}
@@ -129,6 +132,7 @@ function ActionContainer(props: ActionContainerProps): JSX.Element {
129
132
constselected=index===viewIndex;// boolean on whether the current index is the same as the viewIndex
130
133
constlast=viewIndex===-1&&index===hierarchyArr.length-1;// boolean on whether the view index is less than 0 and if the index is the same as the last snapshot's index value in hierarchyArr
131
134
constisCurrIndex=index===currLocation.index;
135
+
132
136
return(
133
137
<Action
134
138
key={`action${index}`}
@@ -242,11 +246,6 @@ function ActionContainer(props: ActionContainerProps): JSX.Element {
0 commit comments