aboutsummaryrefslogtreecommitdiffstats
path: root/ui/resizable.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/resizable.js')
-rw-r--r--ui/resizable.js17
1 files changed, 8 insertions, 9 deletions
diff --git a/ui/resizable.js b/ui/resizable.js
index 88b9ee7ea..2df2413c7 100644
--- a/ui/resizable.js
+++ b/ui/resizable.js
@@ -160,7 +160,8 @@ $.widget("ui.resizable", $.ui.mouse, {
nw: ".ui-resizable-nw"
} );
- if (this.handles.constructor === String) {
+ this._handles = $();
+ if ( this.handles.constructor === String ) {
if ( this.handles === "all") {
this.handles = "n,e,s,w,se,sw,ne,nw";
@@ -198,6 +199,9 @@ $.widget("ui.resizable", $.ui.mouse, {
if (this.handles[i].constructor === String) {
this.handles[i] = this.element.children( this.handles[ i ] ).first().show();
+ } else if ( this.handles[ i ].jquery || this.handles[ i ].nodeType ) {
+ this.handles[ i ] = $( this.handles[ i ] );
+ this._on( this.handles[ i ], { "mousedown": that._mouseDown });
}
if (this.elementIsWrapper && this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)) {
@@ -214,21 +218,17 @@ $.widget("ui.resizable", $.ui.mouse, {
target.css(padPos, padWrapper);
this._proportionallyResize();
-
}
- // TODO: What's that good for? There's not anything to be executed left
- if (!$(this.handles[i]).length) {
- continue;
- }
+ this._handles = this._handles.add( this.handles[ i ] );
}
};
// TODO: make renderAxis a prototype function
this._renderAxis(this.element);
- this._handles = $(".ui-resizable-handle", this.element)
- .disableSelection();
+ this._handles = this._handles.add( this.element.find( ".ui-resizable-handle" ) );
+ this._handles.disableSelection();
this._handles.mouseover(function() {
if (!that.resizing) {
@@ -262,7 +262,6 @@ $.widget("ui.resizable", $.ui.mouse, {
}
this._mouseInit();
-
},
_destroy: function() {