demo/bundle.js
// Remap touch events to pointer events, if the browser doesn't support touch events.
Remap touch events to pointer events, if the browser doesn't support touch events.
Remap touch events to pointer events if the browser doesn ' t support touch events .
function remapEvent(eventName, globalObj = window) {
              if (!('ontouchstart' in globalObj.document)) {
                switch (eventName) {
                case 'touchstart':
                  return 'pointerdown';
                case 'touchmove':
                  return 'pointermove';
                case 'touchend':
                  return 'pointerup';
                default:
                  return eventName;
                }
              }
              return eventName;
            }
function remapEvent ( eventName , globalObj = window ) { if ( ! ( 'ontouchstart' in globalObj . document ) ) { switch ( eventName ) { case 'touchstart' : return 'pointerdown' ; case 'touchmove' : return 'pointermove' ; case 'touchend' : return 'pointerup' ; default : return eventName ; } } return eventName ; }
Remap touch events to pointer events, if the browser doesn't support touch events.
Remap touch events to pointer events if the browser doesn ' t support touch events .