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 compressed popup when reaching right bound of map #823

Merged
merged 4 commits into from
Jun 14, 2019
Merged

Conversation

xintongxia
Copy link

For #676

@xintongxia xintongxia requested a review from Pessimistress June 12, 2019 15:59
@coveralls
Copy link

coveralls commented Jun 12, 2019

Coverage Status

Coverage decreased (-11.7%) to 40.445% when pulling e3afc6a on xx/popup into 6678026 on master.

@Pessimistress
Copy link
Collaborator

If I'm reading this correctly, it doesn't fix anything, just offers an option to fix it?

@xintongxia
Copy link
Author

xintongxia commented Jun 12, 2019

If I'm reading this correctly, it doesn't fix anything, just offers an option to fix it?

I added a css style minWidth to the container

@Pessimistress
Copy link
Collaborator

That is a breaking change and we can't publish it in a patch release.

  • Does mapbox apply minWidth to their popups, if so, what's the value?
  • Add to what's new and upgrade guide

translate(${-anchorPosition.x * 100}%, ${-anchorPosition.y * 100}%)
translate(${left}px, ${top}px)
`,
maxWidth,
Copy link
Author

Choose a reason for hiding this comment

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

@@ -40,6 +40,8 @@ const propTypes = Object.assign({}, BaseControl.propTypes, {
offsetLeft: PropTypes.number,
// Offset from the top
offsetTop: PropTypes.number,
// A number that sets the CSS property of the popup's maxWidth in pixels
maxWidth: PropTypes.number,
Copy link
Author

Choose a reason for hiding this comment

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

@xintongxia xintongxia merged commit a3fdbe2 into master Jun 14, 2019
@xintongxia xintongxia deleted the xx/popup branch June 14, 2019 17:33
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.

3 participants