jgraph / drawio

draw.io is a JavaScript, client-side editor for general diagramming.
https://www.drawio.com
Apache License 2.0
39.93k stars 7.46k forks source link

Drawing "Freehand" with a stylus pen zooms in-and-out at the same time #3959

Open balkanez opened 10 months ago

balkanez commented 10 months ago

Preflight Checklist

Describe the bug When drawing "Freehand" with a stylus, erratic and unexpected zoom-ins happen. For an example: it is almost impossible to write 3 times a letter "A" without zooming in aggressively. It draws a line and zooms in-and-out at the same time. Shapes like "A", "N" and "M" are most problematic. It doesn't matter if the palm is touching the screen or just the stylus tip - the behavior is the same. It seems that every 3rd-5th line is interpreted as pinch zoom at the same time.

To Reproduce

Expected behavior Zoom level stays the same while drawing freehand with a stylus pen.

Desktop (please complete the following information):

Additional context The problem is the same whether it is a Windows Desktop app, online web app or VS Code plugin.


And a big thank you for a powerful and free graph drawing software!

balkanez commented 10 months ago

https://github.com/jgraph/drawio-desktop/assets/34673712/4f03590a-0518-4705-9a55-5f508ad42a37

A video of zooming behavior when writing/drawing.

balkanez commented 9 months ago

Hi, I just wanted to confirm that the weird behavior is still the same in latest version 22.0.3 Freehand drawing with the stylus on Microsoft Surface GO 2 is unusable because of zoom-ins.

alderg commented 8 months ago

Did you rest the palm of your hand on the screen while drawing with the pen? If yes, can you check if this happens without resting the palm of the hand on the screen?

balkanez commented 7 months ago

Sorry for not answering promptly, I haven't had the device with me for a long time.

The version is 22.1.2. It still does the same thing.

Video shows the behavior:

  1. no palm on the screen, just the pen tip
  2. palm resting on the screen
  3. drawing with finger

https://github.com/jgraph/drawio/assets/34673712/1418c82d-1f95-46c9-bd1b-ff0b8edbfc12

hunklin commented 7 months ago

I also meet this issue in my Android Tablet freehand drawing & Win11+ Wacom pen freehand drawing. It is pretty annoying when I use pen to draw .....

hunklin commented 7 months ago

@alderg to add more details about reproducing this in latest web version(v22.1.16)

Thanks a lot for looking into this bug. I often share my screen when I do the drawing in presentation, so it will impact the viewer a lot.

yung2004 commented 4 months ago

I have same issue, I am using Windows 10 and UGEE Drawing Tablet S640W

Papariggi commented 2 months ago

I have the same issue using draw.io version: 24.2.5 OS: Windows 11 device: Lenovo Yoga 7i

PaulB-H commented 2 days ago

I have the same issue, but I found a workaround.

Enabling "Mouse Mode" instead of "Pen Mode" in my Wacom settings stops the zoom bug.

image

Windows 10 Draw.io: 24.6.4 Wacom Bamboo (Very old)

PaulB-H commented 2 days ago

Another solution instead of using "Mouse Mode":

Disable "Windows Ink" if your tablet settings let you.

image

This fixed the zoom bug, and I can still use "Pen Mode". Since Windows Ink is a newer API for pen support in windows, it may cause the pen to not work in other apps that require it and don't support wintab.