Skip to content

Commit

Permalink
Update tron skin to use new arc function
Browse files Browse the repository at this point in the history
  • Loading branch information
mal committed Jan 26, 2014
1 parent e0f3b77 commit 337ab0e
Showing 1 changed file with 7 additions and 15 deletions.
22 changes: 7 additions & 15 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,33 +24,25 @@
// "tron" case
if(this.$.data('skin') == 'tron') {

var a = this.angle(this.cv) // Angle
, sa = this.startAngle // Previous start angle
, sat = this.startAngle // Start angle
, ea // Previous end angle
, eat = sat + a // End angle
this.cursorExt = 0.3;

var a = this.arc(this.cv) // Arc
, pa // Previous arc
, r = 1;

this.g.lineWidth = this.lineWidth;

this.o.cursor
&& (sat = eat - 0.3)
&& (eat = eat + 0.3);

if (this.o.displayPrevious) {
ea = this.startAngle + this.angle(this.v);
this.o.cursor
&& (sa = ea - 0.3)
&& (ea = ea + 0.3);
pa = this.arc(this.v);
this.g.beginPath();
this.g.strokeStyle = this.pColor;
this.g.arc(this.xy, this.xy, this.radius - this.lineWidth, sa, ea, false);
this.g.arc(this.xy, this.xy, this.radius - this.lineWidth, pa.s, pa.e, pa.d);
this.g.stroke();
}

this.g.beginPath();
this.g.strokeStyle = r ? this.o.fgColor : this.fgColor ;
this.g.arc(this.xy, this.xy, this.radius - this.lineWidth, sat, eat, false);
this.g.arc(this.xy, this.xy, this.radius - this.lineWidth, a.s, a.e, a.d);
this.g.stroke();

this.g.lineWidth = 2;
Expand Down

0 comments on commit 337ab0e

Please sign in to comment.