Skip to content

Commit 763d962

Browse files
committed
Merge pull request #1 from ericfreese/master
Fixed a bug where circle angle property resets to 0 after first element when applying warp to multiple elements
2 parents bb95d67 + 110dffa commit 763d962

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/csswarp.0.3.1.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -330,15 +330,15 @@
330330

331331
if(circle.angle){
332332
if(!/rad/gi.test(THIS.config.path.angle)){
333-
circle.angle = parseFloat(circle.angle) * Math.PI/180;
333+
circle.calculatedAngle = parseFloat(circle.angle) * Math.PI/180;
334334
}else{
335-
circle.angle = parseFloat(circle.angle);
335+
circle.calculatedAngle = parseFloat(circle.angle);
336336
}
337337
}else{
338-
circle.angle = 0;
338+
circle.calculatedAngle = 0;
339339
}
340340

341-
circle.angle-= Math.PI/2;
341+
circle.calculatedAngle-= Math.PI/2;
342342

343343
switch(circle.textPosition){
344344
case "inside":
@@ -363,7 +363,7 @@
363363
}
364364

365365
function polarCoords(arc){
366-
var angle = arc/circle.radius+circle.angle,
366+
var angle = arc/circle.radius+circle.calculatedAngle,
367367
cos = Math.cos(angle),
368368
sin = Math.sin(angle),
369369
x = circle.radius*cos+circle.center[0],

0 commit comments

Comments
 (0)