image - javascript - Failed to execute 'drawImage' on CanvasRenderingContext2D (JCrop) -


I am having a problem while dragging the canvas with an image which is already sitting on html when I attract cavas Or if I extend or move the highlighted jcrop handle, it shows this error that failed to execute 'drawing' on "canvasending codec 2D" No function found that matches the provided signature "

< P> Please check my code below.

  $ ("div.jcrop img"). Jackrope ({Change: Show Purchaseview, On Selection: Show Preview, Choose Set: [100, 100, 50, 50]}); Function Show Preview (C) {if (parseInt (c.w)> 0) {// Image Preview Preview Image imageObj = new Image (); ImageObj = $ ("div.jcrop img") [0]; Var canvas = $ ("# preview") [0]; Var Context = Canvas Gate Contact ("2D"); Context.drawImage (imageObj, c.x, c.y, c.w, c.h, 0, 0, canvas.Wide, canvas.height); }}  

I appreciate your help


Comments