0
我使用jquery旋钮以图形方式表示我的数据。jquery旋钮显示输入完成
https://github.com/aterrien/jQuery-Knob
我想只有动画后显示的输入值(在圆圈的中心),但我没有找到如何。我的意见是最初将'displayInput'设置为false,并在动画之后使用完整的函数将其设置为true。我可以看到它适用于fgColor属性,但不适用于displayInput属性。
elm.knob({
'width': 60,
'height': 60,
'min': 0,
'max': 6,
'step': 0.1,
'readOnly': true,
'thickness': .5,
'dynamicDraw': true,
'displayInput': false,
'fgColor': dangerLevelColor,
'inputColor': '#7F8C8D',
format: function (value) {
return value + '/6';
}
});
$({value: 0}).animate({value: dangerLevel}, {
duration: 1500,
easing: 'swing',
progress: function() {
elm.val(this.value).trigger('change');
},
complete: function() {
elm.trigger(
'configure', {
'displayInput': true,
'fgColor': 'green'
});
}
});
任何想法?谢谢!!