| Page 1 of 1 | [ 3 posts ] |
|
I am trying to use the sample code for ImageCropper. In my case the graphic to be cropped displays but I don't see the dotted line crop window you can resize to crop the image. I assume it is overlaid by YAHOO.widget.ImageCropper but I'm not sure.
Code: function setup() { var Dom = YAHOO.util.Dom, Event = YAHOO.util.Event; results = null; results = Dom.get('results'); var crop = new YAHOO.widget.ImageCropper('yui_img', { initialXY: [20, 20], keyTick: 5, shiftKeyTick: 50 }); crop.on('moveEvent', function() { var region = crop.getCropCoords(); results.firstChild.style.top = '-' + region.top + 'px'; results.firstChild.style.left = '-' + region.left + 'px'; results.style.height = region.height + 'px'; results.style.width = region.width + 'px'; Dom.get('t').innerHTML = region.top; Dom.get('l').innerHTML = region.left; Dom.get('h').innerHTML = region.height; Dom.get('w').innerHTML = region.width; }); } Any ideas why the crop window is not showing? |
|
Make sure you have added the `yui-skin-sam` class to the body of your page.
|
|
That was it! Thank you.
|
| Page 1 of 1 | [ 3 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group