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

Convert offsetHeight/Width to clientHeight/Width #7128

Merged
merged 1 commit into from
Aug 17, 2018
Merged

Conversation

ryanhamley
Copy link
Contributor

Launch Checklist

master with offset{Height/Width}

screen shot 2018-08-14 at 1 16 23 pm

canvas-hw with client{Height/Width}

screen shot 2018-08-14 at 1 17 08 pm

@mollymerp mollymerp added the breaking change ⚠️ Requires a backwards-incompatible change to the API label Aug 14, 2018
src/ui/popup.js Outdated
const width = this._container.offsetWidth;
const height = this._container.offsetHeight;
const width = this._container.clientWidth;
const height = this._container.clientHeight;
Copy link
Member

Choose a reason for hiding this comment

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

This is measuring the popup's container rather than the map one, and we might want to leave offset sizes here, since for positioning the popup, it's important to take the whole popup into account (including borders/etc) rather than just its internal area.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I reverted popups and the attribution and logo controls to use offsetWidth/Height

Copy link
Contributor

@mollymerp mollymerp left a comment

Choose a reason for hiding this comment

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

thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change ⚠️ Requires a backwards-incompatible change to the API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants