bpopup icon indicating copy to clipboard operation
bpopup copied to clipboard

recenter incorrect height and width with padding

Open ultimate-tester opened this issue 11 years ago • 2 comments

Hello,

I just discovered that the recenter function uses the incorrect height and width (the ones used in css.height and css.width). If you have a padding or margin on the popupBox div, then the padding will be subtracted from the real size resulting in the box being the amount of left and right padding smaller in width and the amount of top and bottom padding smaller in height.

To fix this, please change the recenter function to the following:

if (_height >= $popup.outerHeight(true)){ css.height = $popup.outerHeight(true); } if(_width >= $popup.outerWidth(true)){ css.width = $popup.outerWidth(true); } height = $popup.outerHeight(true) , width = $popup.outerWidth(true);

Thanks in advance!

ultimate-tester avatar Oct 22 '14 07:10 ultimate-tester

thanks

shedy2 avatar Nov 14 '14 04:11 shedy2

Hey ultimate-tester. I'm not sure that's right. If you only load an image the current release works fine, see example 5b on my demo page: http://dinbror.dk/bpopup. But if I add text or other content there is a bug. I'll look into it, thanks

dinbror avatar Jan 24 '15 20:01 dinbror