Add touch event handlers for canvas
This commit is contained in:
parent
e6aac849fd
commit
cca45c8bbe
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user