@@ -912,25 +912,25 @@ function pointer(p5, fn){
912912
913913 fn . _updatePointerCoords = function ( e ) {
914914 if ( this . _curElement !== null ) {
915- const canvas = this . _curElement . elt ;
916- const sx = canvas . scrollWidth / this . width || 1 ;
917- const sy = canvas . scrollHeight / this . height || 1 ;
915+ const canvas = this . _curElement . elt ;
916+ const sx = canvas . scrollWidth / this . width || 1 ;
917+ const sy = canvas . scrollHeight / this . height || 1 ;
918918
919- if ( e . pointerType == 'touch' ) {
919+ if ( e . pointerType == 'touch' ) {
920920 const touches = [ ] ;
921921 for ( const touch of this . _activePointers . values ( ) ) {
922- touches . push ( getTouchInfo ( canvas , sx , sy , touch ) ) ;
922+ touches . push ( getTouchInfo ( canvas , sx , sy , touch ) ) ;
923923 }
924924 this . touches = touches ;
925- } else {
926- const mousePos = getMouseInfo ( canvas , sx , sy , e ) ;
927- this . movedX = e . movementX || 0 ;
928- this . movedY = e . movementY || 0 ;
929- this . mouseX = mousePos . x ;
930- this . mouseY = mousePos . y ;
931- this . winMouseX = mousePos . winX ;
932- this . winMouseY = mousePos . winY ;
933- }
925+ }
926+
927+ const mousePos = getMouseInfo ( canvas , sx , sy , e ) ;
928+ this . movedX = e . movementX || 0 ;
929+ this . movedY = e . movementY || 0 ;
930+ this . mouseX = mousePos . x ;
931+ this . mouseY = mousePos . y ;
932+ this . winMouseX = mousePos . winX ;
933+ this . winMouseY = mousePos . winY ;
934934
935935 if ( ! this . _hasMouseInteracted ) {
936936 this . _updateMouseCoords ( ) ;
0 commit comments