Loading ...
Sorry, an error occurred while loading the content.

Image Cropper with scaled preview!!

Expand Messages
  • rnby_nl
    http://developer.yahoo.com/yui/imagecropper/#knownissues It was actually quit simple to get it to work with scaled preview.
    Message 1 of 1 , Aug 2 8:26 AM
    • 0 Attachment
      http://developer.yahoo.com/yui/imagecropper/#knownissues

      It was actually quit simple to get it to work with scaled preview.
      http://developer.yahoo.com/yui/examples/imagecropper/feedback_crop.html

      crop.on('moveEvent', function() {
      var region = crop.getCropCoords();
      var orig_image = Dom.get('crop_image')
      results.firstChild.style.top = '-' + region.top * (180 /
      region.height ) + 'px';
      results.firstChild.style.left = '-' + region.left * (140 /
      region.width) + 'px';

      results.firstChild.style.height = (180 / region.height ) *
      orig_image.height
      results.firstChild.width = (140 / region.width) *
      orig_image.width
      });

      obviously you have to set ratio:true
    Your message has been successfully submitted and would be delivered to recipients shortly.