From 425ba72279d9cd13e8bbf01194bf39af9fe03a25 Mon Sep 17 00:00:00 2001 From: DmitryBaranovskiy Date: Sat, 8 May 2010 07:58:48 +1000 Subject: [PATCH] =?utf8?q?1.4.1=20=E2=80=A2=20Small=20bug=20fix=20in=20mul?= =?utf8?q?ti-touch=20implementation?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- raphael.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/raphael.js b/raphael.js index d3d79bb..796eb66 100644 --- a/raphael.js +++ b/raphael.js @@ -1,5 +1,5 @@ /*! - * Raphael 1.4 - JavaScript Vector Library + * Raphael 1.4.1 - JavaScript Vector Library * * Copyright (c) 2010 Dmitry Baranovskiy (http://raphaeljs.com) * Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license. @@ -19,7 +19,7 @@ Raphael = (function () { } return create[apply](R, arguments); } - R.version = "1.4"; + R.version = "1.4.1"; var separator = /[, ]+/, elements = /^(circle|rect|path|ellipse|text|image)$/, proto = "prototype", @@ -2487,7 +2487,7 @@ Raphael = (function () { return function (obj, type, fn, element) { var f = function (e) { if (supportsTouch) { - for (var i = 0, ii = e.targetTouches.length; i < ii; i++) { + for (var i = 0, ii = e.targetTouches && e.targetTouches.length; i < ii; i++) { if (e.targetTouches[i].target == obj) { var olde = e; e = e.targetTouches[i]; @@ -2553,7 +2553,7 @@ Raphael = (function () { Element[proto].drag = function (onmove, onstart, onend) { this._drag = {}; var el = this.mousedown(function (e) { - e.preventDefault(); + (e.originalEvent ? e.originalEvent : e).preventDefault(); this._drag.x = e.clientX; this._drag.y = e.clientY; this._drag.id = e.identifier; @@ -2571,7 +2571,7 @@ Raphael = (function () { if (touch.identifier == el._drag.id) { x = touch.clientX; y = touch.clientY; - e.preventDefault(); + (e.originalEvent ? e.originalEvent : e).preventDefault(); break; } } -- 2.39.2