I am using Rafael.js to draw rectangles on an image. My problem with setting the stroke color is that the background may be dark or light or any color. I thought that the best way to deal with that would be using dashed lines. However this call
circle = Canvas.paper.rect(left, topCoord, width, height).attr({stroke-dasharray:"---"});
does not work. Firebug (on FireFox 20.0) returns an error message saying that an existing function in my .js file does not exist. It appears that stroke-dasharray is not valid for rectangles.
Basic JavaScript error:
{stroke-dasharray:"---"}
Should be:
{"stroke-dasharray":"---"}
Also: "---"
isn't a supported value for stroke-dasharray
; it should be:
{"stroke-dasharray":"--"}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With