So I am using knob.js to create two dials, one inside another. The Outer dial represents the cumulative rating of a book, i.e. the average of all the ratings. This outer dial has data-readOnly="true"
and it's value is visible at the common center of these dials. The inner dial is for me(a user) to submit his rating for that book. Thus, the inner dial value can be changed by me(a user).
<div class="demo_sub_outer">
<input class="knob" data-thickness=".1" data-width="150" data-height="150" data-angleOffset=0 data-displayInput="true" data-angleArc=360 data-fgColor="#209652" data-bgColor="#eee" data-inputColor="" data-readOnly="true" value="{{ u_list.cum_attr_ratings.sexy }}">
</div>
<div class="demo_sub" id="demo_sub_1">
<input class="knob" id="sexy" data-thickness="0.5" data-width="130" data-height="130" data-angleOffset=0 data-displayInput="false" data-angleArc=360 data-fgColor="#b8dcc7" data-bgColor="#e5e5e5" value="{{ u_list.attr_ratings.sexy }}" Title="Cumulative wealthiness" >
</div>
The way I want it to work is, when i change the inner dial value (i.e. when i rate a book, or change my rating for a book) the outer dial value (cumulative rating) should be updated accordingly.
Here's how I tried to do this... jsFiddle
Now this works fine if i change the inner dial value by clicking somewhere on the dial, but if i change this value by dragging mouse... results are unexpected. What could possibly be the reason for this weird behaviour.
EDIT: In the demo at jsFiddle , I have assumed that 3 other users have rated this book 80/100 ...