diff options
author | gromo <yuriy@tokyoscale.com> | 2012-02-22 13:05:02 +0500 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2012-03-02 06:16:39 -0500 |
commit | fea7862ff3c5c3fb65a79fbc32a5af19e1829182 (patch) | |
tree | 75b8c57780d40ba73e8c17aa38797417064e83d4 /ui | |
parent | 5c2eea3fd9bdb069fba6ce962aa885c49b4615a0 (diff) | |
download | jquery-ui-fea7862ff3c5c3fb65a79fbc32a5af19e1829182.tar.gz jquery-ui-fea7862ff3c5c3fb65a79fbc32a5af19e1829182.zip |
Resizable: Update aspectRatio to use calculated aspectRatio in case of: containment - parent; aspectRatio - true. Fixes #8158 - Resizable: aspectRatio: true isn't handled properly.
(cherry picked from commit 3e8ec7eb6bee97034363fe4e8704ed762fadbaba)
Diffstat (limited to 'ui')
-rw-r--r-- | ui/jquery.ui.resizable.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/jquery.ui.resizable.js b/ui/jquery.ui.resizable.js index 8eb72e224..c5ec79c1f 100644 --- a/ui/jquery.ui.resizable.js +++ b/ui/jquery.ui.resizable.js @@ -691,13 +691,13 @@ $.ui.plugin.add("resizable", "containment", { if (cp.left < (self._helper ? co.left : 0)) { self.size.width = self.size.width + (self._helper ? (self.position.left - co.left) : (self.position.left - cop.left)); - if (pRatio) self.size.height = self.size.width / o.aspectRatio; + if (pRatio) self.size.height = self.size.width / self.aspectRatio; self.position.left = o.helper ? co.left : 0; } if (cp.top < (self._helper ? co.top : 0)) { self.size.height = self.size.height + (self._helper ? (self.position.top - co.top) : self.position.top); - if (pRatio) self.size.width = self.size.height * o.aspectRatio; + if (pRatio) self.size.width = self.size.height * self.aspectRatio; self.position.top = self._helper ? co.top : 0; } |