I’m trying to work with the customAttributes of Raphael.
But I the problem is with the arguments inside the customAttributes functions are NAN. Please have a look at this http://jsfiddle.net/5CxVW/1/. In console NAN is logged instead of the h,s,b values and undefined is logged for the path1. What I’m expecting is the step values of h,s,b inside the customAttributes function. Also I want to know how to pass any raphael objects to customAttributes function
this seems to work, but I’m not sure why. I’ve given the path an initial value for hsb, and then animated. Also, I’ve pulled the path parameter from the customattribute. This was me hitting it with a hammer until it worked, as opposed to surgically dissecting it and working out exactly why it doesn’t work.
So on the one hand, horray, it’s working. On the other, I’ve no idea why.
N.
PS. Oh, wait. you’re animating the hsb, which means its adding a fractional value to the intial value until the animation is over. If you haven’t set the value first, maybe that’s why its failing. undefined + .0012 = NaN?