Revert "Draggable: Don't use computed style for top and left of position:relative elements. Fixes #5537 - Draggable: position relative draggable jumps on first drag in Opera"

This reverts commit dc94bbf536.
This commit is contained in:
Richard D. Worth 2010-04-23 16:13:06 -04:00
parent cb7eb69973
commit 670ab819a9

View File

@ -305,8 +305,8 @@ $.widget("ui.draggable", $.ui.mouse, {
if(this.cssPosition == "relative") { if(this.cssPosition == "relative") {
var p = this.element.position(); var p = this.element.position();
return { return {
top: p.top - (parseInt(this.helper[0].style.top,10) || 0) + this.scrollParent.scrollTop(), top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(),
left: p.left - (parseInt(this.helper[0].style.left,10) || 0) + this.scrollParent.scrollLeft() left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft()
}; };
} else { } else {
return { top: 0, left: 0 }; return { top: 0, left: 0 };