diff --git a/editor/svg-editor.js b/editor/svg-editor.js index 08c625bb..7e8faa86 100644 --- a/editor/svg-editor.js +++ b/editor/svg-editor.js @@ -17,11 +17,6 @@ (function() { - document.addEventListener('touchstart', touchHandler, true); - document.addEventListener('touchmove', touchHandler, true); - document.addEventListener('touchend', touchHandler, true); - document.addEventListener('touchcancel', touchHandler, true); - if (!window.svgEditor) window.svgEditor = function($) { var svgCanvas, Editor = {}, diff --git a/editor/touch.js b/editor/touch.js index 3c3bbb58..b5c07865 100644 --- a/editor/touch.js +++ b/editor/touch.js @@ -25,3 +25,8 @@ function touchHandler(event) { event.preventDefault(); } } + +document.addEventListener('touchstart', touchHandler, true); +document.addEventListener('touchmove', touchHandler, true); +document.addEventListener('touchend', touchHandler, true); +document.addEventListener('touchcancel', touchHandler, true); \ No newline at end of file