caleb531 / jcanvas

A jQuery plugin that makes the HTML5 canvas easy to work with.
https://projects.calebevans.me/jcanvas/
MIT License
626 stars 192 forks source link

params.type undefined #118

Closed Walt7 closed 11 years ago

Walt7 commented 11 years ago

in jCanvas v13.08.26 line 2111:

$.fn.draw = function draw(args) { var $canvases = this, $canvas, e, ctx, params /* <-- define here /*, layer;

// Draw using any other method if (drawingMap[params.type]) { /* <--- .type is always undefined */

$canvasesdrawingMap[params.type];

} else { [ecc...]

i'm correct in : $.fn.draw = function draw(args) { var $canvases = this, $canvas, e, ctx, params, layer, type=args&&args.type||'';

// Draw using any other method
if (drawingMap[type]) {

    $canvases[drawingMap[type]](params);

} else {

TKS

W:-}

caleb531 commented 11 years ago

Thanks for the report. I'll have this fixed in the next release of jCanvas.

-Caleb