From 7f487a89b2c721d7cc49e4508b5636695731d218 Mon Sep 17 00:00:00 2001 From: Will Schleter Date: Sat, 21 Jul 2012 11:02:54 +0000 Subject: [PATCH] Address issue 526 - incorporate duopixel's patch to convert touch events to mouse events. git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2085 eee81c28-f429-11dd-99c0-75d572ba1ddd --- editor/browser.js | 2 ++ editor/svg-editor.html | 3 +++ editor/svg-editor.js | 6 ++++++ 3 files changed, 11 insertions(+) diff --git a/editor/browser.js b/editor/browser.js index ff9441ae..edfba7be 100644 --- a/editor/browser.js +++ b/editor/browser.js @@ -38,6 +38,7 @@ var isIE_ = userAgent.indexOf('MSIE') >= 0; var isChrome_ = userAgent.indexOf('Chrome/') >= 0; var isWindows_ = userAgent.indexOf('Windows') >= 0; var isMac_ = userAgent.indexOf('Macintosh') >= 0; +var isTouch_ = 'ontouchstart' in window; var supportsSelectors_ = (function() { return !!svg.querySelector; @@ -159,6 +160,7 @@ svgedit.browser.isIE = function() { return isIE_; } svgedit.browser.isChrome = function() { return isChrome_; } svgedit.browser.isWindows = function() { return isWindows_; } svgedit.browser.isMac = function() { return isMac_; } +svgedit.browser.isTouch = function() { return isTouch_; } svgedit.browser.supportsSelectors = function() { return supportsSelectors_; } svgedit.browser.supportsXpath = function() { return supportsXpath_; } diff --git a/editor/svg-editor.html b/editor/svg-editor.html index 8dce445a..4687ec5f 100644 --- a/editor/svg-editor.html +++ b/editor/svg-editor.html @@ -4,6 +4,8 @@ + + @@ -21,6 +23,7 @@ +