Skip to content

Commit

Permalink
Removed touchStarted/Ended
Browse files Browse the repository at this point in the history
  • Loading branch information
diyaayay committed Nov 19, 2024
1 parent c6d40b8 commit 3d833d1
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 630 deletions.
2 changes: 1 addition & 1 deletion src/core/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class p5 {
pointerdown: null,
pointerup: null,
pointermove: null,
pointercancle:null,
pointercancel:null,
dragend: null,
dragover: null,
click: null,
Expand Down
19 changes: 2 additions & 17 deletions src/events/mouse.js
Original file line number Diff line number Diff line change
Expand Up @@ -1071,12 +1071,7 @@ function mouse(p5, fn){
if (executeDefault === false) {
e.preventDefault();
}
} else if (typeof context.touchMoved === 'function') {
executeDefault = context.touchMoved(e);
if (executeDefault === false) {
e.preventDefault();
}
}
}
}
};

Expand Down Expand Up @@ -1237,12 +1232,7 @@ function mouse(p5, fn){
if (executeDefault === false) {
e.preventDefault();
}
} else if (typeof context.touchStarted === 'function') {
executeDefault = context.touchStarted(e);
if (executeDefault === false) {
e.preventDefault();
}
}
}
};

/**
Expand Down Expand Up @@ -1401,11 +1391,6 @@ function mouse(p5, fn){
if (executeDefault === false) {
e.preventDefault();
}
} else if (typeof context.touchEnded === 'function') {
executeDefault = context.touchEnded(e);
if (executeDefault === false) {
e.preventDefault();
}
}
};

Expand Down
Loading

0 comments on commit 3d833d1

Please sign in to comment.