@@ -430,6 +430,8 @@ DygraphInteraction.startTouch = function(event, g, context) {
430430 context . initialTouches = touches ;
431431
432432 if ( touches . length == 1 ) {
433+ // This is possibly a touchOver, save the last touch to check
434+ context . lastTouch = event ;
433435 // This is just a swipe.
434436 context . initialPinchCenter = touches [ 0 ] ;
435437 context . touchDirections = { x : true , y : true } ;
@@ -476,6 +478,9 @@ DygraphInteraction.moveTouch = function(event, g, context) {
476478 // If the tap moves, then it's definitely not part of a double-tap.
477479 context . startTimeForDoubleTapMs = null ;
478480
481+ // clear the last touch if it's doing something else
482+ context . lastTouch = null ;
483+
479484 var i , touches = [ ] ;
480485 for ( i = 0 ; i < event . touches . length ; i ++ ) {
481486 var t = event . touches [ i ] ;
@@ -581,6 +586,13 @@ DygraphInteraction.endTouch = function(event, g, context) {
581586 context . doubleTapY && Math . abs ( context . doubleTapY - t . screenY ) < 50 ) {
582587 g . resetZoom ( ) ;
583588 } else {
589+
590+ if ( context . lastTouch !== null ) {
591+ // no double-tap, pan or pinch so its a touchover
592+ event . isTouchOver = true ;
593+ g . mousemove ( event ) ;
594+ }
595+
584596 context . startTimeForDoubleTapMs = now ;
585597 context . doubleTapX = t . screenX ;
586598 context . doubleTapY = t . screenY ;
0 commit comments