View Full Version : Drag, Drop and Zoom Image

05-22-2009, 01: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:
To move:
Zoom in-Zoom Out:
?????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, 06: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.

05-22-2009, 06: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.