-
-
Notifications
You must be signed in to change notification settings - Fork 983
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
Width does not shrink when heightCalculationMethod is 'bodyOffset' #70
Comments
The point about the calculation method effecting the width is an interesting one that I will have to think about for a future version. I expect creating a forceResize flag rather than having it dependent on the height calc method is the way forward. As for changing the minHeight, which is an option you can pass in the code and the default height calc method I think the current defaults are best for most users. Thanks, |
I can only get the width to adjust adjust wider but it does not shrink. I'm using the heightCalculationMethod set to max. If it does affect the width as well then the rename might make sense as mentioned above. |
In looking at the code.. the width is calculated off of a fixed type.. so we cannot change it. It uses |
Jake - something else might be going on. In my case the width does shrink when appropriate. |
+1 |
Fixed in v3.0.0. Beta version currently in the dev branch. https://github.com/davidjbradshaw/iframe-resizer/tree/dev |
The only way I was able to get the frame width to shrink reliably was to set heightCalculationMethod: 'max'. That causes a bad flicker when the iframe disappears and the container's footer jumps up. To get around that I set the iframe's CSS min-height to 500px;
I suggest defaulting heightCalculationMethod to 'max'. And on init set the min-height css of the iframe to 500px. Make that a setting of course.
Also 'heightCalculationMethod' should probably be renamed as 'sizeCalculationMethod' as it also effects the width.
The text was updated successfully, but these errors were encountered: