@@ -51,8 +51,9 @@ function load() {
5151 decimals . push ( newOption ( n , i ) ) ;
5252 // init these remaining elements by id:
5353 [ "autoWidth" , "autoAlign" , "autoScale" , "max" , "digits" , "accounting" ,
54- "spins" , "confirms" , "keyboards" , "step" , "delay" , "interval" , "blur-cancel" ,
55- "fontSize" , "fontWeight" , "fontStyle" ] . forEach ( id => initElm ( id , decimals ) ) ;
54+ "spins" , "confirms" , "keyboards" , "step" , "delay" , "interval" , "blurCancel" ,
55+ "anyDecimal" , "fontSize" , "fontWeight" , "fontStyle"
56+ ] . forEach ( id => initElm ( id , decimals ) ) ;
5657
5758 const // #min is a modified clone of #max
5859 min = "min" ,
@@ -151,7 +152,7 @@ function initElm(id, decimals) {
151152 let i , n , opt ;
152153 const elm = document . getElementById ( id ) ;
153154
154- elms [ kebabToCamel ( id ) ] = elm ;
155+ elms [ id ] = elm ;
155156 addChangeEvent ( elm ) ;
156157 switch ( id ) {
157158 case "digits" :
@@ -281,8 +282,9 @@ function updateText() {
281282 for ( elm of [ elms . step , elms . delay , elms . interval ] )
282283 ctrls . add ( elm ) ;
283284
284- if ( elms . blurCancel . checked )
285- ctrls . add ( elms . blurCancel ) ;
285+ for ( elm of [ elms . blurCancel , elms . anyDecimal ] )
286+ if ( elm . checked )
287+ ctrls . add ( elm ) ;
286288
287289 for ( elm of ctrls ) {
288290 prop = elm . id ;
@@ -306,8 +308,8 @@ function updateText() {
306308 js += getText ( elm , prop , true ) ;
307309 }
308310 break ;
309- case elms . accounting : case elms . blurCancel :
310- pre += prop ;
311+ case elms . accounting : case elms . blurCancel : case elms . anyDecimal :
312+ pre += prop . replace ( / [ A - Z ] / g , ch => "-" + ch . toLowerCase ( ) ) ;
311313 js += getText ( null , prop , true , true ) ;
312314 break ;
313315 }
@@ -319,7 +321,7 @@ function updateText() {
319321//======================================
320322function getText ( elm , prop , isJS , val ) {
321323 let equals , prefix , suffix ;
322- const value = ( val != undefined )
324+ const value = ( val !== undefined )
323325 ? val
324326 : isJS && ! Number . isNaN ( parseFloat ( elm . value ) )
325327 ? elm . value
0 commit comments