From: DmitryBaranovskiy Date: Fri, 7 May 2010 21:58:48 +0000 (+1000) Subject: 1.4.1 X-Git-Tag: v1.4.1 X-Git-Url: http://git.roojs.org/?p=raphael;a=commitdiff_plain;h=refs%2Ftags%2Fv1.4.1 1.4.1 • Small bug fix in multi-touch implementation --- 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; } }