hediet / vscode-drawio

This unofficial extension integrates Draw.io (also known as diagrams.net) into VS Code.
https://marketplace.visualstudio.com/items?itemName=hediet.vscode-drawio
GNU General Public License v3.0
9.02k stars 406 forks source link

Freehand drawing isn't smooth on touchscreen #295

Open ManasMadrecha opened 2 years ago

ManasMadrecha commented 2 years ago

What's happening

If we insert Freehand drawing option, then while using touchscreen, the canvas moves. It acts as if it is being dragged here and there. So, one cannot draw using touchscreen.

Expected behaviour

The canvas should not move while using freehand touchscreen drawing. E.g., in excalidraw's VS code plugin, the canvas stays intact.

hediet commented 2 years ago

It works for me with touch screen (using windows). What OS do you use?

ManasMadrecha commented 2 years ago

Hi @hediet, I am using Windows 10 laptop.

Drawio

Here's the video while using touchscreen and you can see how I am unable to drawing anything meaningful on drawio image using touchscreen

https://user-images.githubusercontent.com/65993481/152527274-44c135f9-72a0-47d5-ae1c-03b641123aad.mp4

Whenever I touch it just creates a dot or small line, and when I move my finger, instead of continuing the line, the canvas moves

Excalidraw

And, here's the video while using excalidraw extension, and you can see how smooth it is. And with two fingers, I can choose when you move the canvas.

https://user-images.githubusercontent.com/65993481/152527357-3281e2e1-52c2-4feb-b9d5-868e83931f7a.mp4

But, this extension (drawio) has so many features, so I want to use it for freehand as well, instead of excalidraw. So, it would be great if this issue is sorted out.

Thanks.

ManasMadrecha commented 2 years ago

Alright, found the issue.

The excalidraw extension has a little gray instruction below the pen icon that says you have to click and drag, and release only when you have finished the drawing.

In drawio extension, you have to do a very long tap and then move your finger to continue drawing. If you simply tap and move, it won't work. That will just move the canvas.


Still, don't know why, but the excalidraw extension seems smoother for freehand drawing. Maybe it's because of the two-finger zoom/move the canvas feature? In drawio, the two-finger zoom just zooms in/out anywhere.