Opened 15 years ago
Closed 14 years ago
#3067 closed bug (fixed)
Resizeable and containment works incorrectly
Reported by: | Owned by: | eduardo | |
---|---|---|---|
Priority: | major | Milestone: | 1.7 |
Component: | ui.resizable | Version: | 1.5.1 |
Keywords: | containment out of bounds | Cc: | |
Blocked by: | Blocking: |
Description
When using the resizable ui behaviour like this:
var options={ containmentFix:this.getDayNode(), handles:"n,s", start:onchange, resize:onchange, stop:onchange }; this.node.resizable(options);
(where getDayNode and onchange are specified).
Then the resizeable will resize out of the containment element if there are enough other elements above the contianment elements.
I craeted my own fix, but i dont think this fix is the correct fix for everyone.
I craeted my own containmentFix plugin add like this:
$.ui.plugin.add("resizable", "containmentFix", {
Where all checks for (co.helper ? A : B) where simplified to A.
For example the resize method has the following code:
if (cp.top < (co.top)) { self.size.height = self.size.height + (self.position.top - co.top); if (pRatio) self.size.width = self.size.height / o.aspectRatio; self.position.top = co.top; }
The current code base is like this:
if (cp.top < (o.helper ? co.top : 0)) { self.size.height = self.size.height + (o.helper ? (self.position.top - co.top) : self.position.top); if (pRatio) self.size.width = self.size.height / o.aspectRatio; self.position.top = o.helper ? co.top : 0; }
Hope this gives you enough information to fix this bug. Or maybe i must specify a helper in my options?
I dont know, this was at least awkward enough to file this bug.
Change History (3)
comment:1 Changed 15 years ago by
Milestone: | 1.5.2 → 1.6b |
---|
comment:2 Changed 14 years ago by
Milestone: | 1.6b → 1.6 |
---|
comment:3 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |