]> source.dussan.org Git - jquery-ui.git/commitdiff
Fixed #3251
authorEduardo Lundgren <eduardolundgren@gmail.com>
Tue, 27 Jan 2009 06:36:42 +0000 (06:36 +0000)
committerEduardo Lundgren <eduardolundgren@gmail.com>
Tue, 27 Jan 2009 06:36:42 +0000 (06:36 +0000)
ui/ui.resizable.js

index d5d73c4acd6826b85cc817720553607c4f8312b4..1ee75b41f4ac351ee2ebcb1f96322b8fc0cc3c8b 100644 (file)
@@ -356,9 +356,13 @@ $.widget("ui.resizable", $.extend({}, $.ui.mouse, {
 
        _respectSize: function(data, event) {
 
+               var isNumber = function(value) {
+                       return !isNaN(parseInt(value, 10))
+               };
+
                var el = this.helper, o = this.options, pRatio = this._aspectRatio || event.shiftKey, a = this.axis,
-                               ismaxw = data.width && o.maxWidth && o.maxWidth < data.width, ismaxh = data.height && o.maxHeight && o.maxHeight < data.height,
-                                       isminw = data.width && o.minWidth && o.minWidth > data.width, isminh = data.height && o.minHeight && o.minHeight > data.height;
+                               ismaxw = isNumber(data.width) && o.maxWidth && (o.maxWidth < data.width), ismaxh = isNumber(data.height) && o.maxHeight && (o.maxHeight < data.height),
+                                       isminw = !isNaN(parseInt(data.width, 10)) && o.minWidth && (o.minWidth > data.width), isminh = isNumber(data.height) && o.minHeight && (o.minHeight > data.height);
 
                if (isminw) data.width = o.minWidth;
                if (isminh) data.height = o.minHeight;