@@ -33,12 +33,12 @@ interface ToolbarDragResult {
3333 isDragging : Accessor < boolean > ;
3434 isSnapping : Accessor < boolean > ;
3535 handlePointerDown : ( event : PointerEvent ) => void ;
36- createDragAwareHandler : (
37- callback : ( ) => void ,
38- ) => ( event : MouseEvent ) => void ;
36+ createDragAwareHandler : ( callback : ( ) => void ) => ( event : MouseEvent ) => void ;
3937}
4038
41- export const createToolbarDrag = ( config : ToolbarDragConfig ) : ToolbarDragResult => {
39+ export const createToolbarDrag = (
40+ config : ToolbarDragConfig ,
41+ ) : ToolbarDragResult => {
4242 const [ isDragging , setIsDragging ] = createSignal ( false ) ;
4343 const [ isSnapping , setIsSnapping ] = createSignal ( false ) ;
4444 const [ hasDragMoved , setHasDragMoved ] = createSignal ( false ) ;
@@ -69,10 +69,8 @@ export const createToolbarDrag = (config: ToolbarDragConfig): ToolbarDragResult
6969 const deltaTime = now - lastPointerPosition . time ;
7070
7171 if ( deltaTime > 0 ) {
72- const newVelocityX =
73- ( event . clientX - lastPointerPosition . x ) / deltaTime ;
74- const newVelocityY =
75- ( event . clientY - lastPointerPosition . y ) / deltaTime ;
72+ const newVelocityX = ( event . clientX - lastPointerPosition . x ) / deltaTime ;
73+ const newVelocityY = ( event . clientY - lastPointerPosition . y ) / deltaTime ;
7674 setVelocity ( { x : newVelocityX , y : newVelocityY } ) ;
7775 }
7876
0 commit comments