File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 1212 postcalrender : function ( ) { } ,
1313
1414 get_time_offset : function ( draggable , droppable , parent ) {
15- return draggable . offset . top + parent . scrollTop ( ) - droppable . offsetTop ;
15+ if ( undefined != parent ) {
16+ return draggable . offset . top + parent . scrollTop ( ) - droppable . offsetTop ;
17+ } else {
18+ return draggable . offset . top - droppable . offsetTop ;
19+ }
1620 } ,
1721
1822 // persistent event storage accessor functions
@@ -273,7 +277,7 @@ function Calendar( element, options )
273277 // make compatible with 'drop' parameters
274278 tgtdiv . offsetTop = tgtdiv . offset ( ) . top ;
275279 tgtdiv . offsetLeft = tgtdiv . offset ( ) . left ;
276- var time_offset = t . options . get_time_offset ( ui , tgtdiv , tgtdiv . parent ( ) ) ;
280+ var time_offset = t . options . get_time_offset ( ui , tgtdiv ) ;
277281 var start_time = nearest_time ( time_offset ) ;
278282 ui . helper . find ( ".rc_event_head" ) . text ( start_time ) ;
279283
Original file line number Diff line number Diff line change @@ -279,8 +279,8 @@ function findDroppable( ui )
279279 // should cache this selection...
280280 $ ( '.ui-droppable' ) . each ( function ( ) {
281281
282- var parent = $ ( $ ( this ) . parent ( ) ) ;
283- var viewableTop = parent . position ( ) . top + parent . scrollTop ( ) ;
282+ var parent = $ ( this ) . parent ( ) ;
283+ var viewableTop = parent . position ( ) . top ;
284284 var viewableBottom = viewableTop + parent . height ( ) ;
285285 var pos = ui . position ;
286286
You can’t perform that action at this time.
0 commit comments