#65 CircleLayout setTreeAngles bug + temp fix

open
nobody
None
5
2009-06-10
2009-06-10
g10
No

In a circle layout visualised as a tree (in my case with 2 depths), if the child angle range between first and last child is >Math.PI, then the parents angle seems to be of by Math.PI
I assume the problems resides in the second pass of the setTreeAngles method,
when commenting out line 235 & 236 and assign the a (angle) on line 239 w/o passing it to the minAngle method the problem seems to be solved

235 //while (b > Math.PI) b -= 2*Math.PI;
236 //while (b < -Math.PI) b += 2*Math.PI;

239 _t.$(n).angle = a;//minAngle(n.angle, a);

offcourse, this fix could possibly introduce problems in other cases

Discussion

  • g10

    g10 - 2009-06-10

    wrong

     
  • g10

    g10 - 2009-06-10

    right

     
  • g10

    g10 - 2009-06-10

    2 images in attached illustrating the problem

     

Log in to post a comment.