@@ -199,6 +199,8 @@ var core = function (require, shim, constants) {
199199 f . call ( this ) ;
200200 } ) ;
201201 userDraw ( ) ;
202+ this . _updatePMouseCoords ( ) ;
203+ this . _updatePTouchCoords ( ) ;
202204 this . _registeredMethods . post . forEach ( function ( f ) {
203205 f . call ( this ) ;
204206 } ) ;
@@ -2954,7 +2956,6 @@ var inputmouse = function (require, core, constants) {
29542956 p5 . prototype . mouseIsPressed = false ;
29552957 p5 . prototype . isMousePressed = false ;
29562958 p5 . prototype . _updateMouseCoords = function ( e ) {
2957- this . _updatePMouseCoords ( ) ;
29582959 if ( e . type === 'touchstart' || e . type === 'touchmove' ) {
29592960 this . _setProperty ( 'mouseX' , this . touchX ) ;
29602961 this . _setProperty ( 'mouseY' , this . touchY ) ;
@@ -3110,7 +3111,6 @@ var inputtouch = function (require, core) {
31103111 p5 . prototype . ptouchY = 0 ;
31113112 p5 . prototype . touches = [ ] ;
31123113 p5 . prototype . _updateTouchCoords = function ( e ) {
3113- this . _updatePTouchCoords ( ) ;
31143114 if ( e . type === 'mousedown' || e . type === 'mousemove' ) {
31153115 this . _setProperty ( 'touchX' , this . mouseX ) ;
31163116 this . _setProperty ( 'touchY' , this . mouseY ) ;
0 commit comments