Skip to content

Use getBoundingClientRect for filler dimensions#123

Open
w00fz wants to merge 1 commit intobooncon:masterfrom
w00fz:patch-1
Open

Use getBoundingClientRect for filler dimensions#123
w00fz wants to merge 1 commit intobooncon:masterfrom
w00fz:patch-1

Conversation

@w00fz
Copy link
Copy Markdown

@w00fz w00fz commented Dec 9, 2016

I had issues trying to get the plugin to work with some basic and simple HTML (no images). The ratio for the filler proportions were miscalculated because the target elements had some padding and margin.

I was able to sort this by replacing all the .width() and .height() calls from getFillerProportions to the more reliable getBoundingClientRect.

This worked pretty well for me and if you want to merge the PR, here you have it 😀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant