File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -298,8 +298,8 @@ function setHeaderText(text) {
298298}
299299function setUpAddButton ( ) {
300300 $ ( "#addElem" ) . click ( function ( ) {
301- var val = prompt ( "Which value do you want to add? Integer >= 0 . Maximum number of elements is 10" ) ;
302- if ( isNaN ( parseInt ( val ) ) || control . getArrayLength ( ) >= 10 ) {
301+ var val = prompt ( "Which value do you want to add? Integer in the range 0-99 . Maximum number of elements is 10" ) ;
302+ if ( isNaN ( parseInt ( val ) ) || control . getArrayLength ( ) >= 10 || parseInt ( val ) < 0 || parseInt ( val ) > 99 ) {
303303 return ;
304304 }
305305 viewer . addNode ( parseInt ( val ) ) ;
Original file line number Diff line number Diff line change @@ -342,8 +342,8 @@ function setHeaderText(text: string) {
342342
343343function setUpAddButton ( ) {
344344 $ ( "#addElem" ) . click ( function ( ) {
345- let val = prompt ( "Which value do you want to add? Integer >= 0 . Maximum number of elements is 10" ) ;
346- if ( isNaN ( parseInt ( val ) ) || control . getArrayLength ( ) >= 10 ) {
345+ let val = prompt ( "Which value do you want to add? Integer in the range 0-99 . Maximum number of elements is 10" ) ;
346+ if ( isNaN ( parseInt ( val ) ) || control . getArrayLength ( ) >= 10 || parseInt ( val ) < 0 || parseInt ( val ) > 99 ) {
347347 return ;
348348 }
349349 viewer . addNode ( parseInt ( val ) ) ;
You can’t perform that action at this time.
0 commit comments