diff --git a/README.markdown b/README.markdown index 42162f0..67eb3fe 100644 --- a/README.markdown +++ b/README.markdown @@ -42,7 +42,8 @@ We are organizing the current issues between this milestones, setting the ground All changes in code must go to `raphael.core`, `raphael.svg` or `raphael.vml`. `raphael.js` is a generated file. -After adding your changes, execute `grunt`, the minified version will be created, commit and you are ready to make a pull request! +After changing the core/vml/svg files, execute `grunt` in the dev folder to generate the minified version, commit and you are ready to make a pull request! +Remember that if you want to add a functionality it must be present in the vml and svg versions, *no svg-only features will be accepted.* ## Found an issue? diff --git a/dev/raphael.core.js b/dev/raphael.core.js index 1c6656d..04fa2e6 100644 --- a/dev/raphael.core.js +++ b/dev/raphael.core.js @@ -3205,11 +3205,25 @@ elproto.drag = function (onmove, onstart, onend, move_scope, start_scope, end_scope) { function start(e) { (e.originalEvent || e).preventDefault(); - var scrollY = g.doc.documentElement.scrollTop || g.doc.body.scrollTop, + var x = e.clientX, + y = e.clientY, + scrollY = g.doc.documentElement.scrollTop || g.doc.body.scrollTop, scrollX = g.doc.documentElement.scrollLeft || g.doc.body.scrollLeft; - this._drag.x = e.clientX + scrollX; - this._drag.y = e.clientY + scrollY; this._drag.id = e.identifier; + if (supportsTouch && e.touches) { + var i = e.touches.length, touch; + while (i--) { + touch = e.touches[i]; + this._drag.id = touch.identifier; + if (touch.identifier == this._drag.id) { + x = touch.clientX; + y = touch.clientY; + break; + } + } + } + this._drag.x = x + scrollX; + this._drag.y = y + scrollY; !drag.length && R.mousemove(dragMove).mouseup(dragUp); drag.push({el: this, move_scope: move_scope, start_scope: start_scope, end_scope: end_scope}); onstart && eve.on("raphael.drag.start." + this.id, onstart);