react-zoom-pan-pinch icon indicating copy to clipboard operation
react-zoom-pan-pinch copied to clipboard

image fuzzines on zoom in version 2

Open justinhehli opened this issue 3 years ago • 3 comments

I recently migrated from version 1.6.1 to 2.1.3. In my application, I have an html-svg overlaying a png image inside the TransformWrapper / TransformComponent. On zooming, I expected the png to look fuzzy, not so much the svg. The svg contains points and polygons (with edges), and on the slightest zoom or drag, they look very fuzzy and not sharp anymore.

In the old version 1.6.1, this was not as extreme as in the new 2.1.3, which is why I noticed it in the first place. Definitely a downgrade if one tries using svg, to e.g. make zoomable maps on which users can draw polygons (my use case). Also, the underlaying png image is definitely less sharp zoomed than in the old version.

I attached two sceenshot of the same map / polygon clipping, once version 1.6.1, once version 2.1.3.

Thanks for checking it out in advance!

Version_1 6 1 Version_2 1 3

justinhehli avatar Aug 16 '21 11:08 justinhehli

Is this maybe related to my issue #231 ?

SelfDevTV avatar Aug 19 '21 09:08 SelfDevTV

Is this maybe related to my issue #231 ?

I would guess so, from the pictures it seems to be about the same problem. Even a normal png image gets more blurry than in the old version for me.

For now my tip is to downgrade to 1.6.1, the functionality is the same (as far as I noticed) and it is not blurry. Some of the TransformWrapper props in v2 are burried in an "options" object prop in v1 but oh well. If you are working with React v17, you can still install the 1.6.1 version of this library with the --legacy-peer-deps option and it still works.

justinhehli avatar Aug 19 '21 09:08 justinhehli

@justinhehli Thx I'll give that a try.

SelfDevTV avatar Aug 19 '21 09:08 SelfDevTV

Fixed!

prc5 avatar Feb 27 '23 17:02 prc5