File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,9 @@ <h1>NK-Grahps</h1>
53
53
< span id ="resultp_jump "> </ span >
54
54
</ div >
55
55
< button onclick ="addNewWithControls() "> Add</ button >
56
+
57
+ < hr >
58
+ < button onclick ="reset() "> Reset</ button >
56
59
</ div >
57
60
58
61
< div id ="navigation "> </ div >
@@ -174,21 +177,20 @@ <h1>NK-Grahps</h1>
174
177
document . getElementById ( 'resultp_jump' ) . innerText = newEntry [ 'p_jump' ] ;
175
178
}
176
179
177
- function initInput ( ) {
178
- document . getElementById ( 'resultN' ) . value = newEntry [ 'N' ] ;
179
- document . getElementById ( 'resultK' ) . value = newEntry [ 'K' ] ;
180
- document . getElementById ( 'resultC' ) . value = newEntry [ 'C' ] ;
181
- document . getElementById ( 'resultp_jump' ) . value = newEntry [ 'p_jump' ] ;
182
- }
183
- initInput ( ) ;
184
-
185
180
function updateControls ( e ) {
186
181
newEntry [ e . name ] = e . value ;
187
182
updateTextInput ( ) ;
188
183
}
189
184
190
185
updateTextInput ( ) ;
191
186
187
+ function reset ( ) {
188
+ console . log ( "rest" )
189
+ chart . data . datasets = [ ] ;
190
+ active = { } ;
191
+ chart . update ( ) ;
192
+ }
193
+
192
194
</ script >
193
195
194
196
You can’t perform that action at this time.
0 commit comments