Implement Zooming by ctx.scale() rather than CSS scale in Canvas
I have a project using Canvas. I Implemented Panzoom in it, works fine except we need to fine tune zooming in canvas so that it doesn't Blur/Pixilate. I know that Canvas is raster images/Pixels raher than vector. But we have ctx.scale() function where we can scale the whole canvas so that we get crisp images. Can someone implement zomming such that ctx.scale() is used to scale rather than CSS scale?
Yup, totally possible - would have to implement via custom panController. SVG and DOM elements already have their controllers. See here:
https://github.com/anvaka/panzoom/blob/c52e8e6cbb614ae57f11d4e28ebcb9cf799e872f/index.js#L15-L16
you can follow the same steps to make it work for canvas.
Please let me know if you need help!