@@ -102,7 +102,7 @@ var example7SizeProperty = 'width';
102
102
103
103
function renderThresholdWidth ( evt ) {
104
104
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 ;
106
106
107
107
for ( var i = 0 ; i < activeIndicators . length ; i ++ ) {
108
108
activeIndicators [ i ] . style [ example7SizeProperty ] = ( evt . target . value * 100 ) /
@@ -113,8 +113,9 @@ function renderThresholdWidth(evt) {
113
113
}
114
114
115
115
example7SwapThresholdInput . addEventListener ( 'input' , renderThresholdWidth ) ;
116
+ example7SwapThresholdInput . addEventListener ( 'change' , renderThresholdWidth ) ;
116
117
117
- example7InvertSwapInput . addEventListener ( 'input ' , function ( evt ) {
118
+ example7InvertSwapInput . addEventListener ( 'change ' , function ( evt ) {
118
119
example7Sortable . option ( 'invertSwap' , evt . target . checked ) ;
119
120
120
121
@@ -180,7 +181,7 @@ function renderDirection(evt) {
180
181
target : example7SwapThresholdInput
181
182
} ) ;
182
183
}
183
- example7DirectionInput . addEventListener ( 'input ' , renderDirection ) ;
184
+ example7DirectionInput . addEventListener ( 'change ' , renderDirection ) ;
184
185
185
186
renderDirection ( {
186
187
target : example7DirectionInput
0 commit comments