jakubfiala / atrament

A small JS library for beautiful drawing and handwriting on the HTML Canvas.
http://fiala.space/atrament/demo
MIT License
1.55k stars 116 forks source link

Different behavior when Inspect Element is open on Chrome #83

Closed ztw0 closed 1 year ago

ztw0 commented 1 year ago

Hi, I can't help but notice a difference when using Atrament with and without Inspect Element open on Chrome. It isn't a big issue, but is there a reason for this?

In this picture, the above is written with inspect open, and bottom is without. The above is more rough, and has 0 smoothing lag when writing, where as the version below (the one people will use) behaves properly. image

I tried on this website: https://www.fiala.space/atrament.js/demo/

jakubfiala commented 1 year ago

@ztw0 thank you for reporting the issue! I'll look into it this coming Monday.

jakubfiala commented 1 year ago

@ztw0 I'm afraid I couldn't reproduce the issue (using Chromium on Ubuntu). What OS/Chrome version are you using?

ztw0 commented 1 year ago

@jakubfiala Chrome Version 97.0.4692.71 on Windows 10 It isn't a big issue, as it only happens when inspect element is open. I think it records more points which leads to this behavior. Great library nonetheless!

jakubfiala commented 1 year ago

@ztw0 that's very interesting! It does sound like potentially the frequency of mousemove calls is different when dev tools is open, because technically the website doesn't have focus. If you don't mind, I'll close this ticket as I think it's not actionable. Thank you for reporting the issue!