Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Capture pressure when signing #566

Merged
merged 3 commits into from
Nov 18, 2021
Merged

Capture pressure when signing #566

merged 3 commits into from
Nov 18, 2021

Conversation

UziTech
Copy link
Collaborator

@UziTech UziTech commented Nov 14, 2021

update of #503

closes #503
closes #213
closes #379

Copy link
Owner

@szimek szimek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I hope it works ;)

I'm wondering if we could make some of the properties (e.g. _data) public, or rather stop pretending they are private, or provide getters for them, and document them properly. This would allow us to create toWhateverFormat-type function either as a separate function (e.g. toSvg(signaturePad.data), toIsoData(signaturePad.data) that wouldn't have to be loaded if not used, or even as a third-party add-on library.

Also, I just realized that if we stopped supporting Safari 12 and earlier, we could handle pointer events only... However, it might still be too early - I don't know what types of projects this library is used in.

@UziTech
Copy link
Collaborator Author

UziTech commented Nov 17, 2021

_data is kind of public with the toData() method. I was thinking about that too. Instead of having all of these to* methods just making them separate packages.

Should I remove the toISOData method and let that be a separate package?

@szimek
Copy link
Owner

szimek commented Nov 17, 2021

I forgot about toData() 🤦 .

I think it would be a good idea to extract it. I'm just wondering about API - if these toWhatever functions should accept the whole signaturePad instance or just the result of toData(). E.g. toSVG (which theoretically could also be extracted to a separate function, unless we treat it as a core feature) uses some additional properties like dotSize.

@UziTech
Copy link
Collaborator Author

UziTech commented Nov 17, 2021

One of my next changes was going to put more of those properties into the point groups so we can save information like max/min width and dot size, etc. per line segment. (PR #571)

I feel like toData() should give all of the properties.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: Respect pressure/force on touchevents Capturing biometric data with the sign
2 participants