theacodes / kicanvas

The KiCAD web viewer
https://kicanvas.org
Other
609 stars 29 forks source link

Enhance PanAndZoom with touch support for pinch zoom and single-finger pan #71

Closed sago35 closed 8 months ago

sago35 commented 9 months ago

20

This PR adds touch support. It's a minimal implementation, but it allows for comfortable use of KiCanvas from platforms like Android.

See https://twitter.com/i/status/1739613481052307890

sago35 commented 9 months ago

I have confirmed that touch support works in the following environments:

theacodes commented 9 months ago

Looks like lint is failing, do you mind giving that a look?

sago35 commented 9 months ago

I have fixed the issue. However, it seems that the following warning still exists. I have not corrected this warning, but I can do so if needed.

$ npm run lint:prettier

> kicanvas@0.0.0 lint:prettier
> prettier . --check

Checking formatting...
[warn] src/kicanvas/elements/kc-board/properties-panel.ts
[warn] src/kicanvas/elements/kc-schematic/properties-panel.ts
[warn] Code style issues found in 2 files. Run Prettier to fix.
sago35 commented 8 months ago

@theacodes Can you run the CI first?

theacodes commented 8 months ago

Looks good. Any thing else before I merge? :)

sago35 commented 8 months ago

@theacodes It's fine to merge as it is. Thank you for checking.