MarvinKlein1508 / SignaturePad

A simple to use blazor component to draw custom signatures.
MIT License
72 stars 12 forks source link

Smootness when drawing fast on 60fps and boundless mouse capture #33

Closed CodeGod911 closed 3 days ago

CodeGod911 commented 3 days ago

Great Blazor Component thanks a lot. For our usecase we needed smoother results and better handling if a user draws out of bounds. I made some improvements and if you're interrested i could share my changes. They're not perfectly refined though. image vs image

image vs image

CodeGod911 commented 3 days ago

just saw that https://github.com/MarvinKlein1508/SignaturePad/issues/29 could be related

MarvinKlein1508 commented 3 days ago

Feel free to create a PR and I'll take a look :)

CodeGod911 commented 3 days ago

Should i fork or can i create a branch? Clueless Github user here :)

What im not content with is having to redraw every frame even when not drawing. But as i analyzed it uses almost no performance. But i found the getImage of the (to my knowledge) unused CustomEvent sigpad.move uses a lot of frametime and could be an issue on slower systems and i recommend discarding the details parameter it if not needed. image

MarvinKlein1508 commented 3 days ago

@CodeGod911 fork it.

MarvinKlein1508 commented 3 days ago

But i found the getImage of the (to my knowledge) unused CustomEvent sigpad.move uses a lot of frametime and could be an issue on slower systems and i recommend discarding the details parameter it if not needed.

I think this was a leftover from a try to use native Blazor events. The code base is pretty old. It goes back all the way to .NET 3.1