src/lib/touchhandler.js
function(evt) {
        if (debug) { timedLog("endmark"); }
        if(evt.touches && evt.touches.length > 0) {
          if (handlers.endSecondFinger(evt)) {
            return;
          }
        }
        if (debug) { timedLog("endmark - continued"); }
        mark = copy(positionable.state);
        var modified = transform.modified;
        transform = resetTransform();

        // Only fire a tap if it's under the threshold
        if (tapDiff < MAX_TAP_THRESHOLD && (new Date() - tapStart.timeStart <= tapDuration) && positionable.onTap) {
          positionable.setState({touchactive: false}, function() {
            if(positionable.onTap){
              positionable.onTap();
            }
          });
          return;
        }
        // Reset
        tapDiff = 0;
        positionable.setState({ touchactive: false }, function() {
          if (positionable.onTouchEnd) {
            positionable.onTouchEnd(modified);
          }
        });
      }
function(evt) {
        if (debug) { timedLog("endmark"); }
        if(evt.touches && evt.touches.length > 0) {
          if (handlers.endSecondFinger(evt)) {
            return;
          }
        }
        if (debug) { timedLog("endmark - continued"); }
        mark = copy(positionable.state);
        var modified = transform.modified;
        transform = resetTransform();

        // Only fire a tap if it's under the threshold
        if (tapDiff < MAX_TAP_THRESHOLD && (new Date() - tapStart.timeStart <= tapDuration) && positionable.onTap) {
          positionable.setState({touchactive: false}, function() {
            if(positionable.onTap){
              positionable.onTap();
            }
          });
          return;
        }
        // Reset
        tapDiff = 0;
        positionable.setState({ touchactive: false }, function() {
          if (positionable.onTouchEnd) {
            positionable.onTouchEnd(modified);
          }
        });
      }
function ( evt ) { if ( debug ) { timedLog ( "endmark" ) ; } if ( evt . touches && evt . touches . length > 0 ) { if ( handlers . endSecondFinger ( evt ) ) { return ; } } if ( debug ) { timedLog ( "endmark - continued" ) ; } mark = copy ( positionable . state ) ; var modified = transform . modified ; transform = resetTransform ( ) ; // Only fire a tap if it's under the threshold if ( tapDiff < MAX_TAP_THRESHOLD && ( new Date ( ) - tapStart . timeStart <= tapDuration ) && positionable . onTap ) { positionable . setState ( { touchactive : false } , function ( ) { if ( positionable . onTap ) { positionable . onTap ( ) ; } } ) ; return ; } // Reset tapDiff = 0 ; positionable . setState ( { touchactive : false } , function ( ) { if ( positionable . onTouchEnd ) { positionable . onTouchEnd ( modified ) ; } } ) ; }
When all fingers are off the device, stop being in "touch mode"
When all fingers are off the device stop being in touch mode