Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

it should be possible to set custom logic when resizing support iframe #4

Open
JLarky opened this issue Aug 27, 2022 · 0 comments · May be fixed by #16
Open

it should be possible to set custom logic when resizing support iframe #4

JLarky opened this issue Aug 27, 2022 · 0 comments · May be fixed by #16
Assignees

Comments

@JLarky
Copy link
Collaborator

JLarky commented Aug 27, 2022

In fogbender package adaptIFrame function is called to change iframe size when window is resizing.

We already have disableFit option in renderIframe. So we might want to support that prop in fogbender-react or add a new one that can do custom resizing logic:

    const onResize = (el: HTMLIFrameElement) => {
      el.style.height = `${window.innerHeight - 60}px`;
    };

so to override resizing logic, we can simply add something like this in adaptIFrame:

    if (onResize) {
      return onResize(iFrame);
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants