File tree 1 file changed +7
-6
lines changed
1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change 36
36
37
37
var actualWidth = $tip [ 0 ] . offsetWidth ,
38
38
actualHeight = $tip [ 0 ] . offsetHeight ,
39
- gravity = maybeCall ( this . options . gravity , this . $element [ 0 ] ) ;
39
+ gravity = maybeCall ( this . options . gravity , this . $element [ 0 ] ) ,
40
+ offset = maybeCall ( this . options . offset , this . $element [ 0 ] ) ;
40
41
41
42
var tp ;
42
43
switch ( gravity . charAt ( 0 ) ) {
43
44
case 'n' :
44
- tp = { top : pos . top + pos . height + this . options . offset , left : pos . left + pos . width / 2 - actualWidth / 2 } ;
45
+ tp = { top : pos . top + pos . height + offset , left : pos . left + pos . width / 2 - actualWidth / 2 } ;
45
46
break ;
46
47
case 's' :
47
- tp = { top : pos . top - actualHeight - this . options . offset , left : pos . left + pos . width / 2 - actualWidth / 2 } ;
48
+ tp = { top : pos . top - actualHeight - offset , left : pos . left + pos . width / 2 - actualWidth / 2 } ;
48
49
break ;
49
50
case 'e' :
50
- tp = { top : pos . top + pos . height / 2 - actualHeight / 2 , left : pos . left - actualWidth - this . options . offset } ;
51
+ tp = { top : pos . top + pos . height / 2 - actualHeight / 2 , left : pos . left - actualWidth - offset } ;
51
52
break ;
52
53
case 'w' :
53
- tp = { top : pos . top + pos . height / 2 - actualHeight / 2 , left : pos . left + pos . width + this . options . offset } ;
54
+ tp = { top : pos . top + pos . height / 2 - actualHeight / 2 , left : pos . left + pos . width + offset } ;
54
55
break ;
55
56
}
56
57
272
273
}
273
274
} ;
274
275
275
- } ) ( jQuery ) ;
276
+ } ) ( jQuery ) ;
You can’t perform that action at this time.
0 commit comments