Draft: whiteboard plugin: workaround for wacom quirk.#115
Open
mheistermann wants to merge 1 commit into
Open
Conversation
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On (some?) Wacom tablets (here: Cintiq tablet and MacOS), if you keep a button pressed, lift the pen far from the drawing surface and touch it down, the coordinates of the cursorDown event will be incorrect.
Instead the current mouse coordinates are reported, which usually are where the pen was previously lifted. If we start drawing at such coordinates, we get strange long lines.
This clip demonstrates the issue:
wacom-bug.mp4
Therefore, we should not use startStroke() in the "down" event handler, but only trust the coordinates from "move" events, which appear to be correct.
Interestingly, the official Wacom HTML demo suffers from the same problem.
Another shortcoming is that in this input sequence, the button press is not recognized anymore, reporting buttons "1" instead of "3" for keeping button "2" pressed.
I don't see any way of getting the required information, so that quirk is unchanged.
Note: i maked this as "draft", as i could only test this on our specific hardware.