We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9586bcf + 237e600 commit 38b0071Copy full SHA for 38b0071
src/data.js
@@ -8,6 +8,22 @@ function addData(p5, fn){
8
fn.touchMoved = function (...args) {
9
return this.mouseDragged(...args);
10
};
11
+ p5.Element.prototype.touchStarted = function (cb) {
12
+ return this.mousePressed(cb);
13
+ };
14
+ p5.Element.prototype.touchEnded = function (cb) {
15
+ return this.mouseReleased(cb);
16
17
+ p5.Element.prototype.touchMoved = function (cb) {
18
+ if (cb === false) {
19
+ return this.mouseMoved(false);
20
+ }
21
+ return this.mouseMoved(function (event) {
22
+ if ((event.buttons & 1) !== 0) {
23
+ return cb(event);
24
25
+ });
26
27
28
fn.append = function (array, value) {
29
array.push(value);
0 commit comments