aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorRichard Worth <rdworth@gmail.com>2009-03-17 11:20:31 +0000
committerRichard Worth <rdworth@gmail.com>2009-03-17 11:20:31 +0000
commit765e7b25bfb8bb09b571d626ec309db5561ecbf7 (patch)
tree5066c61801deb94835902032d3c46cd6c5277904 /ui
parent42789bb2e40d98f83312b43e009c60d94856848c (diff)
downloadjquery-ui-765e7b25bfb8bb09b571d626ec309db5561ecbf7.tar.gz
jquery-ui-765e7b25bfb8bb09b571d626ec309db5561ecbf7.zip
Fixed #4199 (resizable with containment boundary - aspectRatio breaks.) with patch from #4349 (Resizable with Containment Aspect Ratio Bug (Includes patching instructions)) props tcarnell and garside
Diffstat (limited to 'ui')
-rw-r--r--ui/ui.resizable.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/ui/ui.resizable.js b/ui/ui.resizable.js
index da33218d3..fef9e4b36 100644
--- a/ui/ui.resizable.js
+++ b/ui/ui.resizable.js
@@ -677,7 +677,7 @@ $.ui.plugin.add("resizable", "containment", {
resize: function(event, ui) {
var self = $(this).data("resizable"), o = self.options,
ps = self.containerSize, co = self.containerOffset, cs = self.size, cp = self.position,
- pRatio = o._aspectRatio || event.shiftKey, cop = { top:0, left:0 }, ce = self.containerElement;
+ pRatio = self._aspectRatio || event.shiftKey, cop = { top:0, left:0 }, ce = self.containerElement;
if (ce[0] != document && (/static/).test(ce.css('position'))) cop = co;
@@ -706,12 +706,12 @@ $.ui.plugin.add("resizable", "containment", {
if (woset + self.size.width >= self.parentData.width) {
self.size.width = self.parentData.width - woset;
- if (pRatio) self.size.height = self.size.width / o.aspectRatio;
+ if (pRatio) self.size.height = self.size.width / self.aspectRatio;
}
if (hoset + self.size.height >= self.parentData.height) {
self.size.height = self.parentData.height - hoset;
- if (pRatio) self.size.width = self.size.height * o.aspectRatio;
+ if (pRatio) self.size.width = self.size.height * self.aspectRatio;
}
},