r2324 - Merged r2298 and r2299 to 1.7.1 (fixes #4199 - resizable with containment boundary - aspe...

r2324 - Merged r2298 and r2299 to 1.7.1 (fixes #4199 - resizable with containment boundary - aspe...


Author: rdworth
Date: Wed Mar 18 17:31:36 2009
New Revision: 2324
Modified:
branches/1.7.1/ui/ui.resizable.js (contents, props changed)
Log:
Merged r2298 and r2299 to 1.7.1 (fixes #4199 - resizable with containment
boundary - aspectRatio breaks.)
Modified: branches/1.7.1/ui/ui.resizable.js
==============================================================================
--- branches/1.7.1/ui/ui.resizable.js    (original)
+++ branches/1.7.1/ui/ui.resizable.js    Wed Mar 18 17:31:36 2009
@@ -677,7 +677,7 @@
    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 @@
        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;
        }
    },