Skip to content

Commit 9105c17

Browse files
authored
Merge pull request #1732 from xyx-is/master
Minor fix for IE compatibility in st/app.js UI of thresholds demo
2 parents 2addddd + ed7042a commit 9105c17

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

st/app.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ var example7SizeProperty = 'width';
102102

103103
function 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

115115
example7SwapThresholdInput.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

185186
renderDirection({
186187
target: example7DirectionInput

0 commit comments

Comments
 (0)