Skip to content

Commit e2e3627

Browse files
author
lauren mccarthy
committed
fixing bug with drag and touch
1 parent 7891816 commit e2e3627

File tree

3 files changed

+5
-11
lines changed

3 files changed

+5
-11
lines changed

lib/p5.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! p5.js v0.3.2 August 13, 2014 */
1+
/*! p5.js v0.3.2 August 16, 2014 */
22
var shim = function (require) {
33
window.requestDraw = function () {
44
return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function (callback, element) {
@@ -2979,9 +2979,6 @@ var inputmouse = function (require, core, constants) {
29792979
if (!this.isMousePressed) {
29802980
if (typeof context.mouseMoved === 'function') {
29812981
context.mouseMoved(e);
2982-
} else if (typeof context.touchMoved === 'function') {
2983-
e.preventDefault();
2984-
context.touchMoved(e);
29852982
}
29862983
} else {
29872984
if (typeof context.mouseDragged === 'function') {
@@ -3078,7 +3075,7 @@ var inputtouch = function (require, core) {
30783075
};
30793076
p5.prototype.ontouchstart = function (e) {
30803077
var context = this._isGlobal ? window : this;
3081-
context.setTouchPoints(e);
3078+
this.setTouchPoints(e);
30823079
if (typeof context.touchStarted === 'function') {
30833080
e.preventDefault();
30843081
context.touchStarted(e);

0 commit comments

Comments
 (0)