BetterTyped/react-zoom-pan-pinch

re:limitToBounds on resize

afgarcia86 opened this issue · 5 comments

Describe the bug
In full screen, if I zoom & pan to the bottom left corner for example, when I scale the view down I often see negative space on the bottom because of the coordinates before scaling. Once I tap the component it seems to auto adjust to the ideal coordinates for the scale. Is there a way to automatically trigger this adjustment onResize?

Screenshots
full screen:
image
scaled down:
image
after tap:
image

use disablePadding={ true }

So I have that set, it doesn't have padding unless I resize the browser window. And it snaps back into place once I click on the view.

mycob commented

So I have that set, it doesn't have padding unless I resize the browser window. And it snaps back into place once I click on the view.

@afgarcia86 Did you ever figure this out by any chance? I'm having the same issue with having too much white space/padding.

So I have that set, it doesn't have padding unless I resize the browser window. And it snaps back into place once I click on the view.

@afgarcia86 Did you ever figure this out by any chance? I'm having the same issue with having too much white space/padding.

Sadly not yet I have just been ignoring it so far. I would be satisfied with a way to programmatically trigger a click.

mycob commented

So I have that set, it doesn't have padding unless I resize the browser window. And it snaps back into place once I click on the view.

@afgarcia86 Did you ever figure this out by any chance? I'm having the same issue with having too much white space/padding.

Sadly not yet I have just been ignoring it so far. I would be satisfied with a way to programmatically trigger a click.

I hear ya. I'll be sure to share if I come up with anything. Thanks.