@@ -102,7 +102,7 @@ var example7SizeProperty = 'width';
102102
103103function renderThresholdWidth ( evt ) {
104104 example7SwapThreshold = Number ( evt . target . value ) ;
105- example7SwapThresholdCode . innerHTML = evt . target . value . indexOf ( '.' ) > - 1 ? evt . target . value . padEnd ( 4 , '0' ) : evt . target . value ;
105+ example7SwapThresholdCode . innerHTML = evt . target . value . indexOf ( '.' ) > - 1 ? ( evt . target . value + '0000' ) . slice ( 0 , 4 ) : evt . target . value ;
106106
107107 for ( var i = 0 ; i < activeIndicators . length ; i ++ ) {
108108 activeIndicators [ i ] . style [ example7SizeProperty ] = ( evt . target . value * 100 ) /
@@ -113,8 +113,9 @@ function renderThresholdWidth(evt) {
113113}
114114
115115example7SwapThresholdInput . addEventListener ( 'input' , renderThresholdWidth ) ;
116+ example7SwapThresholdInput . addEventListener ( 'change' , renderThresholdWidth ) ;
116117
117- example7InvertSwapInput . addEventListener ( 'input ' , function ( evt ) {
118+ example7InvertSwapInput . addEventListener ( 'change ' , function ( evt ) {
118119 example7Sortable . option ( 'invertSwap' , evt . target . checked ) ;
119120
120121
@@ -180,7 +181,7 @@ function renderDirection(evt) {
180181 target : example7SwapThresholdInput
181182 } ) ;
182183}
183- example7DirectionInput . addEventListener ( 'input ' , renderDirection ) ;
184+ example7DirectionInput . addEventListener ( 'change ' , renderDirection ) ;
184185
185186renderDirection ( {
186187 target : example7DirectionInput
0 commit comments