Testing the onContextMenu event.

This commit is contained in:
vdv committed 2022-11-17 23:33:57 +01:00
1 parent 8906bed1e7
commit c731c6a7e6
2 files changed
+16 -1

No files matched your search

+9 -1
View File
@@ -4,10 +4,11 @@ import { Point } from './types';
import './Handler.css';
import { handlersConfig } from './config';
import { Transformation } from './LiveMap';
import cache from '../../lib/cache';
/**
*
*
*
*
*/
export interface HandlersProperties {
@@ -292,6 +293,12 @@ export const Handlers: react.FC<HandlersProperties> = (
}
};
const contextMenuHandler = (event: any) => {
console.log(event);
event.preventDefault();
console.log(cache.map({ cacheId: 'points' }));
};
return (
<div
className='handler'
@@ -306,6 +313,7 @@ export const Handlers: react.FC<HandlersProperties> = (
onTouchCancel={touchCancelHandler}
onTouchStart={touchStartHandler}
onTouchMove={touchMoveHandler}
onContextMenu={contextMenuHandler}
/>
);
};