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

"fixable" line size #56

Open
xXZaretXx opened this issue Dec 7, 2023 · 3 comments
Open

"fixable" line size #56

xXZaretXx opened this issue Dec 7, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@xXZaretXx
Copy link

I have started using js-draw in my notes app.

Unfortunately, I found out that the adjustable pen size is not properly taken into account,
as it still scales with the zoom level, which makes handwritten notes look really unattractive.

It would be great if you could switch the scaling size on and off with a button in the pen menu, as it is practical in principle.

@xXZaretXx xXZaretXx added the enhancement New feature or request label Dec 7, 2023
@personalizedrefrigerator
Copy link
Owner

personalizedrefrigerator commented Dec 7, 2023

Thank you for the feedback!

Other possible solutions

Where possible, I would prefer to avoid adding additional buttons to the toolbar.

Here are some alternative solutions:

  1. Implement zoom snapping: just as the canvas rotation snaps to 90°, 180°, ..., zoom could snap to 25%, 50%, 100%, 200%, 400%, ... .
  2. Add an option to js-draw's configuration object to disable auto-resizing tools.
  3. Add the new button to the "Page" or "Hand" menus and make it apply to all tools.
  4. Making it more difficult to accidentally zoom
    • Users writing with a stylus can currently enable "Touchscreen panning" to make 1-finger touchscreen gestures pan, rather than draw.

Rationale for changing line size

One of js-draw's goals is to support zoom from 10-10x to 1010x. Not having auto-resizing tools makes editing drawings that use this feature difficult.

Other possible causes of messy/hard-to-read strokes

It's also possible that the messyness of handwritten notes is related to:

  • js-draw's main pen tool creates single-width strokes
  • The width of these strokes is based on average pen pressure (and zoom level)
  • js-draw's Bézier curve fitting algorithm. (May be improved in v1.15).

@personalizedrefrigerator
Copy link
Owner

I've implemented zoom snapping in 0378b9d, however, I don't think it's sufficient to solve this issue.

@xXZaretXx
Copy link
Author

I've implemented zoom snapping in 0378b9d, however, I don't think it's sufficient to solve this issue.

Hi @personalizedrefrigerator thanks for the implementation :) maybe not suffcient but a step for a better usabality for writings

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

No branches or pull requests

2 participants