iframe-resizer icon indicating copy to clipboard operation
iframe-resizer copied to clipboard

FR: Add option for manual offset

Open JasonTheAdams opened this issue 3 years ago • 1 comments

Describe the bug We have an iframe with a box shadow. When the iframe resizes the box shadow is clipped as it's not calculated in the container height.

To Reproduce Steps to reproduce the behavior:

  1. Create an iframe with a box shadow
  2. Resize the iframe to a new height
  3. Look at the bottom of the iframe and notice the box shadow is clipped

Expected behavior If there was an offsetHeight option, we could simply set a value which compensates for the box shadow. The offset would simply be applied to the final calculated height and would be a constant. It wouldn't be necessary for us, but allowing for a callback could also be helpful for someone to calculate the offset at each moment of resize.

Screenshots image

Desktop (please complete the following information):

  • OS: MacOS
  • Browser Brave
  • Version 1.34.80

JasonTheAdams avatar Jan 13 '22 03:01 JasonTheAdams

Happy to take a PR for this, can you please add width as well

davidjbradshaw avatar Jan 14 '22 18:01 davidjbradshaw

Fixed in V5.0.0 #1205

davidjbradshaw avatar Feb 11 '24 14:02 davidjbradshaw