File tree 1 file changed +6
-4
lines changed
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 131
131
var diff_y = Math . round ( mouse_actual_pos . top - this . mouse_init_pos . top ) ;
132
132
133
133
var left = Math . round ( this . el_init_offset . left +
134
- diff_x - this . baseX + this . scroll_offset_x ) ;
134
+ diff_x - this . baseX + window . scrollX - this . win_offset_x ) ;
135
135
var top = Math . round ( this . el_init_offset . top +
136
- diff_y - this . baseY + this . scroll_offset_y ) ;
136
+ diff_y - this . baseY + window . scrollY - this . win_offset_y ) ;
137
137
138
138
if ( this . options . limit ) {
139
139
if ( left > this . player_max_left ) {
151
151
pointer : {
152
152
left : mouse_actual_pos . left ,
153
153
top : mouse_actual_pos . top ,
154
- diff_left : diff_x + this . scroll_offset_x ,
155
- diff_top : diff_y + this . scroll_offset_y
154
+ diff_left : diff_x + ( window . scrollX - this . win_offset_x ) ,
155
+ diff_top : diff_y + ( window . scrollY - this . win_offset_y )
156
156
}
157
157
} ;
158
158
} ;
299
299
this . helper = false ;
300
300
}
301
301
302
+ this . win_offset_y = window . scrollY ;
303
+ this . win_offset_x = window . scrollX ;
302
304
this . scroll_offset_y = 0 ;
303
305
this . scroll_offset_x = 0 ;
304
306
this . el_init_offset = this . $player . offset ( ) ;
You can’t perform that action at this time.
0 commit comments