I suspect your difficulty is that you should use canvas.width and canvas.height on the two lines above instead of source.width and source.height.  

Or maybe the problem is that the cropping code is not properly rotating the values it stores in this.source.

You should decide (and document) what coordinate system the this.source crop region is going to be stored in.  Is it the actual coordinates of the original image, or is it rotated coordinates?  I recomend the latter.  Assume the image is already rotated the way you want it, and have this.source be the crop region of the rotated image.

Then you need to deal with rotation when you first initialize the crop region (in resetCropRegion() and getCroppedRegionBlob()) and again when you're actually using the crop region here in this drawImage call.  If you do it that way, then source.width and source.height will be correct as the last two arguments on line 778.  But you'll have to adjust arguments 2 through 5 depending on the rotation.  The same thing goes for the drawImage() call in getCroppedRegionBlob().