Permalink
Browse files

Resizable: Removed call to $.isEmptyObject() to support jQuery < 1.4

  • Loading branch information...
1 parent 29162c3 commit cc4336038042dbe5a12c92e831ec029d8771c390 @eromba committed Jul 16, 2012
Showing with 7 additions and 2 deletions.
  1. +7 −2 ui/jquery.ui.resizable.js
View
9 ui/jquery.ui.resizable.js
@@ -289,7 +289,8 @@ $.widget("ui.resizable", $.ui.mouse, {
var el = this.helper, props = {},
smp = this.originalMousePosition, a = this.axis,
prevTop = this.position.top, prevLeft = this.position.left,
- prevWidth = this.size.width, prevHeight = this.size.height;
+ prevWidth = this.size.width, prevHeight = this.size.height,
+ elemResized = false;
var dx = (event.pageX-smp.left)||0, dy = (event.pageY-smp.top)||0;
var trigger = this._change[a];
@@ -312,23 +313,27 @@ $.widget("ui.resizable", $.ui.mouse, {
if (this.position.top !== prevTop) {
props.top = this.position.top + "px";
+ elemResized = true;
}
if (this.position.left !== prevLeft) {
props.left = this.position.left + "px";
+ elemResized = true;
}
if (this.size.width !== prevWidth) {
props.width = this.size.width + "px";
+ elemResized = true;
}
if (this.size.height !== prevHeight) {
props.height = this.size.height + "px";
+ elemResized = true;
}
el.css(props);
if (!this._helper && this._proportionallyResizeElements.length)
this._proportionallyResize();
// Call the user callback if the element was resized
- if ( ! $.isEmptyObject(props) ) {
+ if (elemResized) {
this._trigger('resize', event, this.ui());
}

0 comments on commit cc43360

Please sign in to comment.