aboutsummaryrefslogtreecommitdiffstats
path: root/ui/ui.resizable.js
diff options
context:
space:
mode:
authorEduardo Lundgren <eduardolundgren@gmail.com>2009-01-27 06:36:42 +0000
committerEduardo Lundgren <eduardolundgren@gmail.com>2009-01-27 06:36:42 +0000
commitdfef53612c3f9b40c7e71badca0d8258b94ccf5d (patch)
tree0b064817c1dcb5ac5d7fba5cfc8954e03a55847a /ui/ui.resizable.js
parent7f12279da59e86c0a0342e7a17b927c53be73697 (diff)
downloadjquery-ui-dfef53612c3f9b40c7e71badca0d8258b94ccf5d.tar.gz
jquery-ui-dfef53612c3f9b40c7e71badca0d8258b94ccf5d.zip
Fixed #3251
Diffstat (limited to 'ui/ui.resizable.js')
-rw-r--r--ui/ui.resizable.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/ui/ui.resizable.js b/ui/ui.resizable.js
index d5d73c4ac..1ee75b41f 100644
--- a/ui/ui.resizable.js
+++ b/ui/ui.resizable.js
@@ -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;