Commentinga bunch of console.log().

This commit is contained in:
Eric van der Vlist 2022-10-14 22:26:41 +02:00
parent 50d9fba939
commit 25e50a2b9c
2 changed files with 23 additions and 24 deletions

View File

@ -29,20 +29,19 @@ const DoubleTouchHandler: react.FC<DoubleTouchHandlerProps> = (
const [touchState, setTouchState] = useState(initialTouchState);
console.log('DoubleTouchHandler, touchState: ' + JSON.stringify(touchState));
// console.log('DoubleTouchHandler, touchState: ' + JSON.stringify(touchState));
const genericHandler = (event: any) => {
console.log('Log - Event: ' + event.type);
if (event.type.startsWith('touch')) {
if (event.touches.length > 1) {
console.log(
`${event.touches.length} touches, (${event.touches[0].pageX}, ${event.touches[0].pageY}), (${event.touches[1].pageX}, ${event.touches[1].pageY})`
);
}
console.log('touchState: ' + JSON.stringify(touchState));
return;
}
// console.log('Log - Event: ' + event.type);
// if (event.type.startsWith('touch')) {
// if (event.touches.length > 1) {
// console.log(
// `${event.touches.length} touches, (${event.touches[0].pageX}, ${event.touches[0].pageY}), (${event.touches[1].pageX}, ${event.touches[1].pageY})`
// );
// }
// console.log('touchState: ' + JSON.stringify(touchState));
// return;
// }
};
const touchCancelHandler = (event: any) => {
genericHandler(event);
@ -84,7 +83,7 @@ const DoubleTouchHandler: react.FC<DoubleTouchHandlerProps> = (
(event.touches[0].pageY - event.touches[1].pageY) ** 2
);
const factor = newDistance / touchState.distance;
console.log(`+++++++++ ZOOM Factor is ${factor} ++++++++++`);
// console.log(`+++++++++ ZOOM Factor is ${factor} ++++++++++`);
setTouchState({
state: 'double',
touches: [

View File

@ -25,19 +25,19 @@ const SingleTouchHandler: react.FC<SingleTouchHandlerProps> = (
const [touchState, setTouchState] = useState(initialTouchState);
console.log('SingleTouchHandler, touchState: ' + JSON.stringify(touchState));
// console.log('SingleTouchHandler, touchState: ' + JSON.stringify(touchState));
const genericHandler = (event: any) => {
console.log('Log - Event: ' + event.type);
if (event.type.startsWith('touch')) {
if (event.touches.length > 0) {
console.log(
`Touch1 : (${event.touches[0].pageX}, ${event.touches[0].pageY})`
);
}
console.log('touchState: ' + JSON.stringify(touchState));
return;
}
// console.log('Log - Event: ' + event.type);
// if (event.type.startsWith('touch')) {
// if (event.touches.length > 0) {
// console.log(
// `Touch1 : (${event.touches[0].pageX}, ${event.touches[0].pageY})`
// );
// }
// console.log('touchState: ' + JSON.stringify(touchState));
// return;
// }
};
const touchCancelHandler = (event: any) => {