onPointerMove not doing anything #70
-
Helloooo, so I've been trying to build like a skribble.io clone and I'm currently working on the canvas but onPointerMove does not seem to work at all. <Canvas
ref={canvasRef}
height="600px"
width="600px"
canvasColor="white"
allowOnlyPointerType="all"
backgroundImage=""
style={{
border: "0.0625rem solid #9c9c9c",
borderRadius: "0.25rem",
}}
exportWithBackgroundImage={false}
preserveBackgroundImageAspectRatio=""
paths={paths}
isDrawing={isDrawing}
onPointerDown={onPointerDown}
onPointerMove={(e) => console.log('move', e)}
onPointerUp={onPointerUp}
/> I basically copied issue #14 but with hooks but when I move the pointer nothing gets logged out |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Actually my bad... |
Beta Was this translation helpful? Give feedback.
Actually my bad...
Looked inside the canvas code and realised isDrawing needs to be true in order to run onPointerMove and after correcting that it works fine, but it's extremely laggy, funny thing is, it is laggier for the user drawing rather than the one receiving, any workarounds for that?