@@ -46,7 +46,7 @@ $.widget( "ui.draggable", {
46
46
47
47
// TODO: why is relative handled differently than fixed/absolute?
48
48
_getPosition : function ( ) {
49
- var left , top , position ,
49
+ var left , top , position , offset ,
50
50
scrollTop = this . scrollParent . scrollTop ( ) ,
51
51
scrollLeft = this . scrollParent . scrollLeft ( ) ;
52
52
@@ -56,7 +56,7 @@ $.widget( "ui.draggable", {
56
56
57
57
// Take into account scrollbar
58
58
position . top -= scrollTop ;
59
- position . left -= scrollLeft
59
+ position . left -= scrollLeft ;
60
60
61
61
return position ;
62
62
}
@@ -148,7 +148,7 @@ $.widget( "ui.draggable", {
148
148
this . dragEl
149
149
// TODO: should we move this to the stylesheet and use a class?
150
150
. css ( "position" , "absolute" )
151
- . appendTo ( this . doc [ 0 ] . body )
151
+ . appendTo ( this . document [ 0 ] . body )
152
152
. offset ( this . element . offset ( ) ) ;
153
153
}
154
154
@@ -168,31 +168,31 @@ $.widget( "ui.draggable", {
168
168
} ;
169
169
170
170
// 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' ) {
172
172
this . overflowOffset = this . scrollParent . offset ( ) ;
173
173
}
174
174
175
175
this . overflow = { } ;
176
176
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 ( ) ;
179
179
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 ( ) ;
182
182
183
183
this . _preparePosition ( event ) ;
184
184
185
185
allowed = this . _trigger ( "start" , event , this . _uiHash ( ) ) ;
186
186
187
187
// If user stops propagation, leave helper there ( if there's one ), disallow any CSS changes
188
188
if ( allowed !== true ) {
189
- this . doc . unbind ( "." + this . widgetName ) ;
189
+ this . document . unbind ( "." + this . widgetName ) ;
190
190
return ;
191
191
}
192
192
193
193
this . _setCss ( event ) ;
194
194
195
- this . _bind ( this . doc , {
195
+ this . _bind ( this . document , {
196
196
mousemove : "_mouseMove" ,
197
197
mouseup : "_mouseUp"
198
198
} ) ;
@@ -208,7 +208,7 @@ $.widget( "ui.draggable", {
208
208
209
209
// If user stops propagation, leave helper there ( if there's one ), disallow any CSS changes
210
210
if ( allowed !== true ) {
211
- this . doc . unbind ( "." + this . widgetName ) ;
211
+ this . document . unbind ( "." + this . widgetName ) ;
212
212
return ;
213
213
}
214
214
@@ -237,7 +237,7 @@ $.widget( "ui.draggable", {
237
237
238
238
}
239
239
240
- this . doc . unbind ( "." + this . widgetName ) ;
240
+ this . document . unbind ( "." + this . widgetName ) ;
241
241
} ,
242
242
243
243
// Uses event to determine new position of draggable, before any override from callbacks
@@ -257,7 +257,7 @@ $.widget( "ui.draggable", {
257
257
this . tempPosition = {
258
258
left : newLeft ,
259
259
top : newTop
260
- }
260
+ } ;
261
261
262
262
// Refresh offset cache with new positions
263
263
this . offset . left = this . startOffset . left + newLeft ;
0 commit comments