Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
img = new Image();
img.src = file.dataURL;
canvas.width = this.width;
canvas.height = this.height;
// Draw the image cropped
ctx.drawImage(
img, this.$refs.image.x, this.$refs.image.y,
this.$refs.image.resizeWidth, this.$refs.image.resizeHeight);
this.saving = true;
// Complete the upload
let data = canvas.toDataURL(),
result = done(Dropzone.dataURItoBlob(data));
this.currentimage = data;
return result;
},