// http://ross.posterous.com/2008/08/19/iphone-touch-events-in-javascript/
/**
 *
 * @param {Event} ev
 * @returns {void}
 */
const touchHandler = (ev) => {
  const { changedTouches } = ev
  const first = changedTouches[0]

  let type = ''
  switch (ev.type) {
    case 'touchstart': type = 'mousedown'; break
    case 'touchmove': type = 'mousemove'; break
    case 'touchend': type = 'mouseup'; break
    default: return
  }

  const { screenX, screenY, clientX, clientY } = first
  const simulatedEvent = new MouseEvent(type, {
    // Event interface
    bubbles: true,
    cancelable: true,
    // UIEvent interface
    view: window,
    detail: 1, // click count
    // MouseEvent interface (customized)
    screenX,
    screenY,
    clientX,
    clientY,
    // MouseEvent interface (defaults) - these could be removed
    ctrlKey: false,
    altKey: false,
    shiftKey: false,
    metaKey: false,
    button: 0, // main button (usually left)
    relatedTarget: null
  })
  if (changedTouches.length < 2) {
    first.target.dispatchEvent(simulatedEvent)
    ev.preventDefault()
  }
}

export const init = (_svgCanvas) => {
  document.addEventListener('touchstart', touchHandler, true)
  document.addEventListener('touchmove', touchHandler, true)
  document.addEventListener('touchend', touchHandler, true)
  document.addEventListener('touchcancel', touchHandler, true)
}

@@ -150,16 +150,38 @@
 v) =%3E %7B%0A
+  ev.preventDefault()%0A
   const 
@@ -1080,32 +1080,8 @@
 nt)%0A
-    ev.preventDefault()%0A
   %7D%0A
@@ -1108,9 +1108,8 @@
  = (
-_
 svgC
@@ -1122,23 +1122,32 @@
  =%3E %7B%0A  
-documen
+svgCanvas.svgroo
 t.addEve
@@ -1183,33 +1183,36 @@
 hHandler
-, true)%0A  documen
+)%0A  svgCanvas.svgroo
 t.addEve
@@ -1247,33 +1247,36 @@
 hHandler
-, true)%0A  documen
+)%0A  svgCanvas.svgroo
 t.addEve
@@ -1314,25 +1314,28 @@
 dler
-, true)%0A  documen
+)%0A  svgCanvas.svgroo
 t.ad
@@ -1380,14 +1380,8 @@
 dler
-, true
 )%0A%7D%0A

Update touch.js