From 61be265b91b602dcc485e64666aeff4bbd947959 Mon Sep 17 00:00:00 2001 From: Bruno Heridet Date: Thu, 21 Feb 2013 14:48:24 +0000 Subject: [PATCH] moved touch events listeners to touch.js git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2449 eee81c28-f429-11dd-99c0-75d572ba1ddd --- editor/svg-editor.js | 5 ----- editor/touch.js | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) 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