]> source.dussan.org Git - jquery-ui.git/commitdiff
alsoResize IE bug fixes
authorEduardo Lundgren <eduardolundgren@gmail.com>
Sun, 1 Jun 2008 20:06:21 +0000 (20:06 +0000)
committerEduardo Lundgren <eduardolundgren@gmail.com>
Sun, 1 Jun 2008 20:06:21 +0000 (20:06 +0000)
ui/source/ui.resizable.js

index e94cfee58d13fe3cf7416b04a48b17029d8ba327..10a2ce2f5bd696f45a8be4d41f98825651b253f6 100644 (file)
                        \r
                        _store = function(exp) {\r
                                $(exp).each(function() {\r
-                                       $(this).data("resizable-alsoresize-start", {\r
-                                               width: parseInt($(this).css('width'), 10), height: parseInt($(this).css('height'), 10),\r
+                                       $(this).data("resizable-alsoresize", {\r
+                                               width: parseInt($(this).width(), 10), height: parseInt($(this).height(), 10),\r
                                                left: parseInt($(this).css('left'), 10), top: parseInt($(this).css('top'), 10)\r
                                        });\r
                                });\r
                        \r
                        _alsoResize = function(exp, c) {\r
                                $(exp).each(function() {\r
-                                       var start = $(this).data("resizable-alsoresize-start"), style = {}, css = c && c.length ? c : ['width', 'height', 'top', 'left'];\r
+                                       var start = $(this).data("resizable-alsoresize"), style = {}, css = c && c.length ? c : ['width', 'height', 'top', 'left'];\r
                                        \r
                                        $.each(css || ['width', 'height', 'top', 'left'], function(i, prop) {\r
-                                               style[prop] = (start[prop] + delta[prop]) || null\r
+                                               var sum = (start[prop]||0) + (delta[prop]||0);\r
+                                               if (sum && sum >= 0)\r
+                                                       style[prop] = sum || null;\r
                                        });\r
-                                       \r
                                        $(this).css(style);\r
                                });\r
                        };\r