react-d3-speedometer icon indicating copy to clipboard operation
react-d3-speedometer copied to clipboard

zoom in or out not take parent width

Open IsAmitprajapati opened this issue 3 years ago • 3 comments

when i was zoom in does not take the parent width and height Screenshot 2022-10-10 105107

IsAmitprajapati avatar Oct 10 '22 05:10 IsAmitprajapati

This is outside the scope of what the library can do. When you zoom in/out with browser tools, the browser infers the text size and mostly increases/decreases the text size to match the zoom. It is possible that it can apply the same logic to some elements like images. In any case, the width/height has not changed during zooming in/out. Just how it is shown is changed by the browser. For the library to rerender, the width has to change which is not the case when zooming is happening.

palerdot avatar Oct 10 '22 13:10 palerdot

Think of a magnifying glass. When you look via magnifying glass, things look bigger, but the thing itself has not gotten bigger. This is just how browsers 'decide' to show you things. When the width/height actually changes, then parent width/height will be taken.

I'm just keeping it open so that people don't keep creating new issues for this.

palerdot avatar Oct 10 '22 13:10 palerdot

This problem is because this library is not responsive-friendly, I have tried to fix it using resize event, but do not help me.

grifin85 avatar Apr 12 '23 07:04 grifin85