You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 1, 2022. It is now read-only.
Thanks for the awesome library! It's very handy and easy to use.
I discovered an issue with touch devices. When using the mouse to draw, the line starts at the initial mouse down position. You can see in the image below that when I start drawing at the edge of the grey pillar, the line starts from that location.
When using a touch device (Active stylus, finger on touch screen, touch emulation in chrome) you can see the line doesn't start until after you have moved away from the initial touch start location.
This makes it hard to draw precise lines and almost impossible to write text.
Possible solution:
I updated handleTouchStart to fire off a handlePointerMove initially so the drawing starts at the initial touch down location. This allows the line to start immediately without skipping. There maybe a better way to handle this but this worked great for me. 👍
handleTouchStart = e => {
const { x, y } = this.getPointerPos(e);
// Ensure the initial down position gets added to our line
this.isPressing = true;
this.handlePointerMove(e);
this.lazy.update({ x, y }, { both: true });
this.handleMouseDown(e);
this.mouseHasMoved = true;
};
The text was updated successfully, but these errors were encountered:
Thanks for the awesome library! It's very handy and easy to use.
I discovered an issue with touch devices. When using the mouse to draw, the line starts at the initial mouse down position. You can see in the image below that when I start drawing at the edge of the grey pillar, the line starts from that location.
When using a touch device (Active stylus, finger on touch screen, touch emulation in chrome) you can see the line doesn't start until after you have moved away from the initial touch start location.
This makes it hard to draw precise lines and almost impossible to write text.
Possible solution:
I updated
handleTouchStart
to fire off ahandlePointerMove
initially so the drawing starts at the initial touch down location. This allows the line to start immediately without skipping. There maybe a better way to handle this but this worked great for me. 👍The text was updated successfully, but these errors were encountered: