Closed neszt closed 11 years ago
Hello!
This two examples from docs does not do the same. Tested on: http://calebevans.me/projects/jcanvas/docs/drawManually/#draw-anything
The draw() method can be used to draw any other jCanvas drawing (although usually this is not necessary).
$("canvas").draw({ type: "rectangle", fillStyle: "#c33", x: 100, y: 100, width: 100, height: 80 });Try it! The above code is equivalent to the following:
$("canvas").drawRect({ fillStyle: "#c33", x: 100, y: 100, width: 100, height: 80 });
Thanks for the report. I will release a fix in the coming days (hopefully on Tuesday).
-Caleb
Hello!
This two examples from docs does not do the same. Tested on: http://calebevans.me/projects/jcanvas/docs/drawManually/#draw-anything
The draw() method can be used to draw any other jCanvas drawing (although usually this is not necessary).
$("canvas").draw({ type: "rectangle", fillStyle: "#c33", x: 100, y: 100, width: 100, height: 80 });Try it! The above code is equivalent to the following:
$("canvas").drawRect({ fillStyle: "#c33", x: 100, y: 100, width: 100, height: 80 });