Commentinga bunch of console.log().
This commit is contained in:
parent
50d9fba939
commit
25e50a2b9c
|
@ -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: [
|
||||
|
|
|
@ -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) => {
|
||||
|
|
Loading…
Reference in New Issue