File tree Expand file tree Collapse file tree 3 files changed +12
-4
lines changed
Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -44,17 +44,21 @@ body {
4444 transition : transform 2s ;
4545}
4646
47+ .computation-history-parent {
48+ visibility : hidden;
49+
50+ }
51+
4752.computation-history {
4853 height : 490px ;
4954 width : 400px ;
5055 display : flex;
5156 flex-direction : column;
52- visibility : hidden;
5357 margin-left : 10px ;
5458 padding-top : 10px ;
5559}
5660
57- .computation-history .visility {
61+ .computation-history-parent .visility {
5862 visibility : visible;
5963}
6064
Original file line number Diff line number Diff line change 3535 < div data-value =") " data-operator class ="child operator "> )</ div >
3636 </ div >
3737
38- < div >
38+ < div class =" computation-history-parent " >
3939 < ul class ="computation-history "> </ ul >
4040 < button class ="clear-history-btn "> clear history</ button >
4141
Original file line number Diff line number Diff line change @@ -3,10 +3,14 @@ const historyElement = document.querySelector(".computation-history");
33let screen = document . querySelector ( "[data-screen]" ) ;
44const historyBtn = document . querySelector ( ".history-btn" ) ;
55const slidingPart = document . querySelector ( ".sliding-part" ) ;
6+ const computationHistoryParent = document . querySelector ( ".computation-history-parent" )
67const operators = document . querySelectorAll ( "[data-operator]" ) ;
78const clearHistoryBtn = document . querySelector ( ".clear-history-btn" ) ;
89
910
11+ console . log ( computationHistoryParent ) ;
12+
13+
1014
1115const operatorRegex = / [ \/ * \- + ] / ;
1216const ZERO = 0 ;
@@ -19,7 +23,7 @@ console.log(slidingPart)
1923
2024historyBtn . addEventListener ( "click" , ( ) => {
2125 slidingPart . classList . toggle ( "slide" )
22- historyElement . classList . toggle ( "visility" )
26+ computationHistoryParent . classList . toggle ( "visility" )
2327} )
2428
2529
You can’t perform that action at this time.
0 commit comments