react-sketch
react-sketch copied to clipboard
Drawing with Touchscreen in Chrome
Is there any plan to get drawing with a touchscreen working for react-sketch? We have some users with Lenovo touchscreen laptops and pens (running Windows) that could benefit greatly from this feature. In Chrome I can occassionally get a dot when using a pen to write at http://tbolis.github.io/showcase/react-sketch/, but it isn't consistent enough to draw.
Thanks for this tool!
--Jim
Did you find a solution to this problem?
Hi everyone. Please, let me know if it possible to solve this problem. I really need it. Or any ideas to solve this
A quick and dirty solution I found is adding these three lines in the componentDidMount of SketchField. On NPM Release 0.5.1 you need to add them at line 589, but it should be fairly obvious on where to place them.
Be warned this might cause some unintended sideeffects, but it works fine for my purposes.
canvas.on("touch:start", this._onMouseDown);
canvas.on("touch:move", this._onMouseMove);
canvas.on("touch:end", this._onMouseUp);