File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -828,12 +828,18 @@ namespace Private {
828828
829829 /**
830830 * Find the drag scroll target under the mouse, if any.
831+ *
832+ * @param event - The mouse event related to the action.
833+ *
834+ * @param dragOffsetX - the number of pixels to offset the drag in the x direction.
835+ *
836+ * @param dragOffsetY - the number of pixels to offset the drag in the y direction.
831837 */
832838 export
833- function findScrollTarget ( event : MouseEvent , dragOffsetX : number , dragOffsetY : number ) : IScrollTarget | null {
839+ function findScrollTarget ( event : MouseEvent , dragOffsetX ? : number , dragOffsetY ? : number ) : IScrollTarget | null {
834840 // Look up the client mouse position.
835- const x = event . clientX + dragOffsetX ;
836- const y = event . clientY + dragOffsetY ;
841+ const x = event . clientX + ( dragOffsetX !== undefined ? dragOffsetX : 0 ) ;
842+ const y = event . clientY + ( dragOffsetY !== undefined ? dragOffsetY : 0 ) ;
837843
838844 // Get the element under the mouse.
839845 let element : Element | null = document . elementFromPoint ( x , y ) ;
You can’t perform that action at this time.
0 commit comments