File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -298,8 +298,8 @@ function setHeaderText(text) {
298
298
}
299
299
function setUpAddButton ( ) {
300
300
$ ( "#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 ) {
303
303
return ;
304
304
}
305
305
viewer . addNode ( parseInt ( val ) ) ;
Original file line number Diff line number Diff line change @@ -342,8 +342,8 @@ function setHeaderText(text: string) {
342
342
343
343
function setUpAddButton ( ) {
344
344
$ ( "#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 ) {
347
347
return ;
348
348
}
349
349
viewer . addNode ( parseInt ( val ) ) ;
You can’t perform that action at this time.
0 commit comments