#1682 closed enhancement (fixed)
Resizable containment option
Reported by: | dgouldin | Owned by: | paul |
---|---|---|---|
Priority: | major | Milestone: | 1.5 |
Component: | ui.core | Version: | 1.2.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Add a containment option to resizable with the same behavior as the drggable containment option.
See Google Groups thread for more info: http://groups.google.com/group/jquery-ui/browse_thread/thread/b67134155d012f5d
Attachments (1)
Change History (7)
comment:1 Changed 16 years ago by
Changed 16 years ago by
Attachment: | resizable_containment.diff added |
---|
Updated resizable containment implementation
comment:2 Changed 16 years ago by
Thanks for the suggestion. I took some more inspiration from draggable and am now taking parent node offsets into account. I think this solves the issue you were referring to.
comment:3 Changed 16 years ago by
Owner: | set to paul |
---|---|
Status: | new → assigned |
comment:6 Changed 14 years ago by
Milestone: | → 1.5 |
---|
Note: See
TracTickets for help on using
tickets.
Hi!
I think your enhancement is great. However, there are problems, if one of the resizeable's parent nodes is positioned relative or absolute. In that case the left and top offsets of these parent nodes must be subtracted from the left- and top-value that will be used for the containment calculations (i.e. the first to elements of options.containment ).
If the parentNode itsself is positioned relative or absolute everything's quite easy, then options.containment should just look like (around line 65):
However if one of the other parent nodes are positioned things get more difficult I guess.
At the moment I have no really good idea how to fix this properly...
Thanks anyways.