Skip to content

Commit 7941f7c

Browse files
committed
Draggable: Redid f7ec502 after bad merge.
1 parent 536a118 commit 7941f7c

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

ui/jquery.ui.draggable.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ $.widget( "ui.draggable", {
4646

4747
// TODO: why is relative handled differently than fixed/absolute?
4848
_getPosition: function() {
49-
var left, top, position,
49+
var left, top, position, offset,
5050
scrollTop = this.scrollParent.scrollTop(),
5151
scrollLeft = this.scrollParent.scrollLeft();
5252

@@ -56,7 +56,7 @@ $.widget( "ui.draggable", {
5656

5757
// Take into account scrollbar
5858
position.top -= scrollTop;
59-
position.left -= scrollLeft
59+
position.left -= scrollLeft;
6060

6161
return position;
6262
}
@@ -148,7 +148,7 @@ $.widget( "ui.draggable", {
148148
this.dragEl
149149
// TODO: should we move this to the stylesheet and use a class?
150150
.css( "position", "absolute" )
151-
.appendTo( this.doc[0].body )
151+
.appendTo( this.document[0].body )
152152
.offset( this.element.offset() );
153153
}
154154

@@ -168,31 +168,31 @@ $.widget( "ui.draggable", {
168168
};
169169

170170
// Cache the offset of scrollParent, if required for _handleScrolling
171-
if ( this.scrollParent[0] != this.doc[0] && this.scrollParent[0].tagName != 'HTML') {
171+
if ( this.scrollParent[0] !== this.document[0] && this.scrollParent[0].tagName !== 'HTML') {
172172
this.overflowOffset = this.scrollParent.offset();
173173
}
174174

175175
this.overflow = {};
176176

177-
this.overflow.height = ( this.scrollParent[0] === this.doc[0] ) ?
178-
this.win.height() : this.scrollParent.height();
177+
this.overflow.height = ( this.scrollParent[0] === this.document[0] ) ?
178+
this.window.height() : this.scrollParent.height();
179179

180-
this.overflow.width = ( this.scrollParent[0] === this.doc[0] ) ?
181-
this.win.width() : this.scrollParent.width();
180+
this.overflow.width = ( this.scrollParent[0] === this.document[0] ) ?
181+
this.window.width() : this.scrollParent.width();
182182

183183
this._preparePosition( event );
184184

185185
allowed = this._trigger( "start", event, this._uiHash() );
186186

187187
// If user stops propagation, leave helper there ( if there's one ), disallow any CSS changes
188188
if ( allowed !== true ) {
189-
this.doc.unbind( "." + this.widgetName );
189+
this.document.unbind( "." + this.widgetName );
190190
return;
191191
}
192192

193193
this._setCss( event );
194194

195-
this._bind( this.doc, {
195+
this._bind( this.document, {
196196
mousemove: "_mouseMove",
197197
mouseup: "_mouseUp"
198198
});
@@ -208,7 +208,7 @@ $.widget( "ui.draggable", {
208208

209209
// If user stops propagation, leave helper there ( if there's one ), disallow any CSS changes
210210
if ( allowed !== true ) {
211-
this.doc.unbind( "." + this.widgetName );
211+
this.document.unbind( "." + this.widgetName );
212212
return;
213213
}
214214

@@ -237,7 +237,7 @@ $.widget( "ui.draggable", {
237237

238238
}
239239

240-
this.doc.unbind( "." + this.widgetName );
240+
this.document.unbind( "." + this.widgetName );
241241
},
242242

243243
// Uses event to determine new position of draggable, before any override from callbacks
@@ -257,7 +257,7 @@ $.widget( "ui.draggable", {
257257
this.tempPosition = {
258258
left: newLeft,
259259
top: newTop
260-
}
260+
};
261261

262262
// Refresh offset cache with new positions
263263
this.offset.left = this.startOffset.left + newLeft;

0 commit comments

Comments
 (0)