Hello all,
I have an application that dynamically adds images to a container. The
images are set to be both resizable and draggable. I'm trying to make
it so that the user can't put any part of the image outside of the
container, but I'm having major difficulty, as the resizable plugin
allows my images to resize out of the container. This appears to be a
bug in the latest version of the jquery ui code from the site. Anybody
have an idea how I can fix this? I've been having problems with this
for a couple of months. Here is a snippet of the code I'm using to do
this:

//ImageName is a the name allocated to the image in the previous step
when the image was created.
//#EditorDiv is the container div I'm using. The images should not be
resizable out of this div (it is 300X300).

$("#" + ImageName).resizable(
                                { aspectRatio: true,
                                        containment: $("#EditorDiv"),
                                        animate: 'slow',
                                        maxWidth: 300,
                                        maxHeight: 300,
                                        revert: true
                                })
                                .parent().draggable({
                                containment: $("#EditorDiv"),
                                revert: "true",
                                cursor: "move"
                        });
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to