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

[fix] Allow negative %/vh/vw offsets #227

Merged
merged 1 commit into from
Apr 23, 2017
Merged

Conversation

FezVrasta
Copy link
Member

Previously there was a bug that prevented to use a negative offset value, e.g. -50%.

@FezVrasta FezVrasta merged commit 27a22db into master Apr 23, 2017
@FezVrasta FezVrasta deleted the fix-negative-offsets branch April 23, 2017 08:21
const refBottom = reference.getBoundingClientRect().bottom;
const refWidth = reference.offsetWidth;
const refHeight = reference.offsetHeight;
const popperLeft = popper.getBoundingClientRect().left;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could have done a single call to getBoundingClientRect, no?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's just a test and I don't care about performance in the code I write in the tests, but I agree it would have been cleaner.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, so it is. Yeah, I don't care about performance in tests, either.

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.

2 participants