rcrop
rcrop copied to clipboard
after uploading new image getDataURL is not getting updated
After uploading new image, when I try to crop or resize it, image getDataURL var srcOriginal = $('#image-3').rcrop('getDataURL');
is not getting updated.
$('#image-3').on('rcrop-changed', function(){ var srcOriginal = $('#image-3').rcrop('getDataURL'); $('#cropped-resized').html('<img style="width: 80px; height: 120px; margin-left:30px; margin-right: 30px;" src="'+srcOriginal+'">'); });
I have an image uploader which previews an image you select, allows you to resize, and then shows the resized version.
The original code allowed you to resize a static image, so I've added the ability to upload an image to replace this static one. (#image-3).
However, when you upload and resize, it still shows the static image on the resized version.