Bug in resizable

1 view
Skip to first unread message

DiTieM

unread,
Feb 14, 2009, 11:44:21 PM2/14/09
to jQuery UI Development
_updateCache: function(data) {
var o = this.options;
this.offset = this.helper.offset();
if (data.left) this.position.left = data.left;
if (data.top) this.position.top = data.top;
if (data.height) this.size.height = data.height;
if (data.width) this.size.width = data.width;
},

should be:

_updateCache: function(data) {
var o = this.options;
this.offset = this.helper.offset();
if (data.left !== undefined ) this.position.left = data.left;
if (data.top !== undefined ) this.position.top = data.top;
if (data.height !== undefined ) this.size.height = data.height;
if (data.width !== undefined ) this.size.width = data.width;
},


This bug makes a little jump when a resizable is about to reach the
coordinate 0 (in x- or y-axis).
The possible ranges of values (for top and left) are -
inf...-1,1...inf, because if ( data.left ) is false
when data.left is zero.

hope this helps.

Scott González

unread,
Feb 15, 2009, 10:26:37 AM2/15/09
to jQuery UI Development
Reply all
Reply to author
Forward
0 new messages