Add touch event handlers for canvas

This commit is contained in:
factman60@gmail.com 2024-05-26 04:41:36 +01:00
parent e6aac849fd
commit cca45c8bbe

View File

@ -800,6 +800,9 @@ export default function Editor(props: EditorProps) {
onMouseDown={onMouseDown}
onMouseUp={onCanvasMouseUp}
onMouseMove={onMouseDrag}
onTouchStart={onMouseDown}
onTouchEnd={onCanvasMouseUp}
onTouchMove={onMouseDrag}
ref={(r) => {
if (r && !context) {
const ctx = r.getContext("2d")