Skip to content
Permalink
Browse files

Fixed #3251

  • Loading branch information
eduardolundgren committed Jan 27, 2009
1 parent 7f12279 commit dfef53612c3f9b40c7e71badca0d8258b94ccf5d
Showing with 6 additions and 2 deletions.
  1. +6 −2 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;

0 comments on commit dfef536

Please sign in to comment.
You can’t perform that action at this time.