未验证 提交 9105c17d 编写于 作者: O owen-m1 提交者: GitHub

Merge pull request #1732 from xyx-is/master

Minor fix for IE compatibility in st/app.js UI of thresholds demo
......@@ -102,7 +102,7 @@ var example7SizeProperty = 'width';
function renderThresholdWidth(evt) {
example7SwapThreshold = Number(evt.target.value);
example7SwapThresholdCode.innerHTML = evt.target.value.indexOf('.') > -1 ? evt.target.value.padEnd(4, '0') : evt.target.value;
example7SwapThresholdCode.innerHTML = evt.target.value.indexOf('.') > -1 ? (evt.target.value + '0000').slice(0, 4) : evt.target.value;
for (var i = 0; i < activeIndicators.length; i++) {
activeIndicators[i].style[example7SizeProperty] = (evt.target.value * 100) /
......@@ -113,8 +113,9 @@ function renderThresholdWidth(evt) {
}
example7SwapThresholdInput.addEventListener('input', renderThresholdWidth);
example7SwapThresholdInput.addEventListener('change', renderThresholdWidth);
example7InvertSwapInput.addEventListener('input', function(evt) {
example7InvertSwapInput.addEventListener('change', function(evt) {
example7Sortable.option('invertSwap', evt.target.checked);
......@@ -180,7 +181,7 @@ function renderDirection(evt) {
target: example7SwapThresholdInput
});
}
example7DirectionInput.addEventListener('input', renderDirection);
example7DirectionInput.addEventListener('change', renderDirection);
renderDirection({
target: example7DirectionInput
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册