Add arcs to g meter between max and min.
@@ -149,8 +149,20 @@ function gMeterRenderer(locationId, plim, nlim) {
el.addClass('marks')
.rotate((i-1)/this.nticks*360, 0, 0);
}
- card.line(-140, 0, -190, 0).addClass('marks limit').rotate((plim-10)/this.nticks*360, 0, 0);
- card.line(-140, 0, -190, 0).addClass('marks limit').rotate((nlim-10)/this.nticks*360, 0, 0);
+ card.line(-140, 0, -190, 0).addClass('marks limit').rotate((plim-1)/this.nticks*360, 0, 0);
+ card.line(-140, 0, -190, 0).addClass('marks limit').rotate((nlim-1)/this.nticks*360, 0, 0);
+
+ var ax = -Math.cos(2*Math.PI/this.nticks),
+ ay = -Math.sin(2*Math.PI/this.nticks);
+ card.path('M -170 0, A 170 170 0 0 1 ' + 170*ax + ' ' + 170*ay)
+ .rotate(-Math.floor(plim)/this.nticks*360, 0, 0)
+ .addClass('marks')
+ .style('fill-opacity', '0');
+ card.path('M -175 0, A 175 175 0 0 1 ' + 175*ax + ' ' + 175*ay)
+ .rotate(-Math.floor(plim)/this.nticks*360, 0, 0)
+ .addClass('marks')
+ .style('fill-opacity', '0');
+
this.pointer_el = gMeter.group().addClass('g');
this.pointer_el.polygon('0,0 -170,0 -150,-10 0,-10').addClass('pointer');
@@ -170,7 +182,9 @@ function gMeterRenderer(locationId, plim, nlim) {
reset.circle(60).cx(0).cy(0).addClass('reset');
reset.text("RESET").cx(0).cy(0).addClass('text');
reset.on('click', function() {
+ reset.animate(200).rotate(20, 0, 0);
this.reset();
+ reset.animate(200).rotate(0, 0, 0);
}, this);
}
