...

View Full Version : Drag, Drop and Zoom Image



traucostar
05-22-2009, 12:52 AM
I know the basics of Java, maybe this is too difficult for me but I must start with something. This is what Im trying to do:
http://img29.picoodle.com/img/img29/2/5/21/traucostar/f_dragdropm_9586ce3.jpg (http://www.picoodle.com/view.php?img=/2/5/21/traucostar/f_dragdropm_9586ce3.jpg&srv=img29)


To drag and Drop:
http://developer.yahoo.com/yui/3/examples/dd/groups-drag.html
To move:
http://developer.yahoo.com/yui/3/examples/dd/constrained-drag.html
Zoom in-Zoom Out:
http://www.agilepartners.com/blog/2005/12/07/iphoto-image-resizing-using-javascript/
Save:
?????How I can save the final result inside the div????

I am going to work on this for a few days reading the instruccions above, can you give me some directions or useful info??

Old Pedant
05-22-2009, 05:36 AM
You seem to have found the pieces you need, except maybe rotate. Is there a specific question?

FWIW, I don't see a need for drag-and-drop here. I'd just have the user click on an image at the top an wham, it appears centered on the object in the middle. Yes, then allow them to move it around. But since the size of the thumbnails at the top and the size of the image on the cup are different, drag-and-drop doesn't "feel" right, to me. They'd have to drag a small image onto the cup and then resize it. Whereas if you just use "click on it", you could automatically resize to what you deem best fit. Yeah, they can then still resize, but you've started them off cleaner.

Oh, by the way: Knowing Java won't help you a lot here. Knowing Javascript would, though.

Mikebert4
05-22-2009, 05:17 PM
I agree with Pendant - Drag&Drop doesn't seem to fit the page you're describing.

However, if you're set on D&D then I swear by a libary written by Walter Zorn - FOUND HERE (http://www.walterzorn.com/dragdrop/dragdrop_e.htm) - Which ought to do exactly what you want, and more. It's not Java, only javascript - but you could execute this in pretty much anything you want.

Flash/java is probally going to offer the most functionality - though Javascript (and php if you want to actually manipulate the images/save them) is perfectly capable of providing the operations you describe.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum