refactor(gesture): update Gesture API to latest (#19671)

This commit is contained in:
Liam DeBeasi
2019-10-17 14:18:39 -04:00
committed by GitHub
parent f69f9e4d54
commit df1bc1e627
12 changed files with 33 additions and 33 deletions

View File

@ -92,8 +92,8 @@ export const createPointerEvents = (
stopMouse();
};
const setDisabled = (disabled: boolean) => {
if (disabled) {
const enable = (enable = true) => {
if (!enable) {
if (rmTouchStart) {
rmTouchStart();
}
@ -114,12 +114,12 @@ export const createPointerEvents = (
};
const destroy = () => {
setDisabled(true);
enable(false);
pointerUp = pointerMove = pointerDown = undefined;
};
return {
setDisabled,
enable,
stop,
destroy
};