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'
});
}
});
何か案が?ありがとう!!