@@ -24,13 +24,13 @@ $.widget("ui.droppable", {
24
24
version : "@VERSION" ,
25
25
widgetEventPrefix : "drop" ,
26
26
options : {
27
- accept : '*' ,
27
+ accept : "*" ,
28
28
activeClass : false ,
29
29
addClasses : true ,
30
30
greedy : false ,
31
31
hoverClass : false ,
32
- scope : ' default' ,
33
- tolerance : ' intersect'
32
+ scope : " default" ,
33
+ tolerance : " intersect"
34
34
} ,
35
35
_create : function ( ) {
36
36
@@ -70,7 +70,7 @@ $.widget("ui.droppable", {
70
70
71
71
_setOption : function ( key , value ) {
72
72
73
- if ( key === ' accept' ) {
73
+ if ( key === " accept" ) {
74
74
this . accept = $ . isFunction ( value ) ? value : function ( d ) {
75
75
return d . is ( value ) ;
76
76
} ;
@@ -84,7 +84,7 @@ $.widget("ui.droppable", {
84
84
this . element . addClass ( this . options . activeClass ) ;
85
85
}
86
86
if ( draggable ) {
87
- this . _trigger ( ' activate' , event , this . ui ( draggable ) ) ;
87
+ this . _trigger ( " activate" , event , this . ui ( draggable ) ) ;
88
88
}
89
89
} ,
90
90
@@ -94,7 +94,7 @@ $.widget("ui.droppable", {
94
94
this . element . removeClass ( this . options . activeClass ) ;
95
95
}
96
96
if ( draggable ) {
97
- this . _trigger ( ' deactivate' , event , this . ui ( draggable ) ) ;
97
+ this . _trigger ( " deactivate" , event , this . ui ( draggable ) ) ;
98
98
}
99
99
} ,
100
100
@@ -111,7 +111,7 @@ $.widget("ui.droppable", {
111
111
if ( this . options . hoverClass ) {
112
112
this . element . addClass ( this . options . hoverClass ) ;
113
113
}
114
- this . _trigger ( ' over' , event , this . ui ( draggable ) ) ;
114
+ this . _trigger ( " over" , event , this . ui ( draggable ) ) ;
115
115
}
116
116
117
117
} ,
@@ -129,7 +129,7 @@ $.widget("ui.droppable", {
129
129
if ( this . options . hoverClass ) {
130
130
this . element . removeClass ( this . options . hoverClass ) ;
131
131
}
132
- this . _trigger ( ' out' , event , this . ui ( draggable ) ) ;
132
+ this . _trigger ( " out" , event , this . ui ( draggable ) ) ;
133
133
}
134
134
135
135
} ,
@@ -145,7 +145,7 @@ $.widget("ui.droppable", {
145
145
}
146
146
147
147
this . element . find ( ":data(ui-droppable)" ) . not ( ".ui-draggable-dragging" ) . each ( function ( ) {
148
- var inst = $ . data ( this , ' ui-droppable' ) ;
148
+ var inst = $ . data ( this , " ui-droppable" ) ;
149
149
if (
150
150
inst . options . greedy &&
151
151
! inst . options . disabled &&
@@ -165,7 +165,7 @@ $.widget("ui.droppable", {
165
165
if ( this . options . hoverClass ) {
166
166
this . element . removeClass ( this . options . hoverClass ) ;
167
167
}
168
- this . _trigger ( ' drop' , event , this . ui ( draggable ) ) ;
168
+ this . _trigger ( " drop" , event , this . ui ( draggable ) ) ;
169
169
return this . element ;
170
170
}
171
171
@@ -197,18 +197,18 @@ $.ui.intersect = function(draggable, droppable, toleranceMode) {
197
197
t = droppable . offset . top , b = t + droppable . proportions . height ;
198
198
199
199
switch ( toleranceMode ) {
200
- case ' fit' :
200
+ case " fit" :
201
201
return ( l <= x1 && x2 <= r && t <= y1 && y2 <= b ) ;
202
- case ' intersect' :
202
+ case " intersect" :
203
203
return ( l < x1 + ( draggable . helperProportions . width / 2 ) && // Right Half
204
204
x2 - ( draggable . helperProportions . width / 2 ) < r && // Left Half
205
205
t < y1 + ( draggable . helperProportions . height / 2 ) && // Bottom Half
206
206
y2 - ( draggable . helperProportions . height / 2 ) < b ) ; // Top Half
207
- case ' pointer' :
207
+ case " pointer" :
208
208
draggableLeft = ( ( draggable . positionAbs || draggable . position . absolute ) . left + ( draggable . clickOffset || draggable . offset . click ) . left ) ;
209
209
draggableTop = ( ( draggable . positionAbs || draggable . position . absolute ) . top + ( draggable . clickOffset || draggable . offset . click ) . top ) ;
210
210
return isOverAxis ( draggableTop , t , droppable . proportions . height ) && isOverAxis ( draggableLeft , l , droppable . proportions . width ) ;
211
- case ' touch' :
211
+ case " touch" :
212
212
return (
213
213
( y1 >= t && y1 <= b ) || // Top edge touching
214
214
( y2 >= t && y2 <= b ) || // Bottom edge touching
@@ -229,7 +229,7 @@ $.ui.intersect = function(draggable, droppable, toleranceMode) {
229
229
*/
230
230
$ . ui . ddmanager = {
231
231
current : null ,
232
- droppables : { ' default' : [ ] } ,
232
+ droppables : { " default" : [ ] } ,
233
233
prepareOffsets : function ( t , event ) {
234
234
235
235
var i , j ,
@@ -314,37 +314,37 @@ $.ui.ddmanager = {
314
314
315
315
var parentInstance , scope , parent ,
316
316
intersects = $ . ui . intersect ( draggable , this , this . options . tolerance ) ,
317
- c = ! intersects && this . isover ? ' isout' : ( intersects && ! this . isover ? ' isover' : null ) ;
317
+ c = ! intersects && this . isover ? " isout" : ( intersects && ! this . isover ? " isover" : null ) ;
318
318
if ( ! c ) {
319
319
return ;
320
320
}
321
321
322
322
if ( this . options . greedy ) {
323
323
// find droppable parents with same scope
324
324
scope = this . options . scope ;
325
- parent = this . element . parents ( ' :data(ui-droppable)' ) . filter ( function ( ) {
326
- return $ . data ( this , ' ui-droppable' ) . options . scope === scope ;
325
+ parent = this . element . parents ( " :data(ui-droppable)" ) . filter ( function ( ) {
326
+ return $ . data ( this , " ui-droppable" ) . options . scope === scope ;
327
327
} ) ;
328
328
329
329
if ( parent . length ) {
330
- parentInstance = $ . data ( parent [ 0 ] , ' ui-droppable' ) ;
331
- parentInstance . greedyChild = ( c === ' isover' ) ;
330
+ parentInstance = $ . data ( parent [ 0 ] , " ui-droppable" ) ;
331
+ parentInstance . greedyChild = ( c === " isover" ) ;
332
332
}
333
333
}
334
334
335
335
// we just moved into a greedy child
336
- if ( parentInstance && c === ' isover' ) {
336
+ if ( parentInstance && c === " isover" ) {
337
337
parentInstance . isover = false ;
338
338
parentInstance . isout = true ;
339
339
parentInstance . _out . call ( parentInstance , event ) ;
340
340
}
341
341
342
342
this [ c ] = true ;
343
- this [ c === ' isout' ? ' isover' : ' isout' ] = false ;
343
+ this [ c === " isout" ? " isover" : " isout" ] = false ;
344
344
this [ c === "isover" ? "_over" : "_out" ] . call ( this , event ) ;
345
345
346
346
// we just moved out of a greedy child
347
- if ( parentInstance && c === ' isout' ) {
347
+ if ( parentInstance && c === " isout" ) {
348
348
parentInstance . isout = false ;
349
349
parentInstance . isover = true ;
350
350
parentInstance . _over . call ( parentInstance , event ) ;
0 commit comments