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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FE-7750] Fix inconsistent display of mapbox logo / watermark #302

Merged
merged 5 commits into from Feb 13, 2019

Conversation

CaitW
Copy link
Contributor

@CaitW CaitW commented Feb 8, 2019

Merge Checklist

馃敡 Issue(s) fixed:

  • Author referenced issue(s) fixed by this PR:
  • Fixes FE-7750

馃毈 Smoke Test

  • Works in chrome
  • Works in firefox
  • Works in safari
  • Works in ie edge
  • Works in ie 11

馃殺 Merge

  • author crafted PR's title into release-worthy commit message.

@CaitW CaitW requested a review from uyanga-gb February 8, 2019 01:51
@CaitW CaitW changed the title [FE-7750] Fix inconsistent display of mapbox logo / watermark [FE-7750] [WIP] Fix inconsistent display of mapbox logo / watermark Feb 8, 2019
@CaitW CaitW changed the title [FE-7750] [WIP] Fix inconsistent display of mapbox logo / watermark [WIP] [FE-7750] Fix inconsistent display of mapbox logo / watermark Feb 8, 2019
@CaitW CaitW changed the title [WIP] [FE-7750] Fix inconsistent display of mapbox logo / watermark [FE-7750] Fix inconsistent display of mapbox logo / watermark Feb 12, 2019
@@ -277,8 +277,9 @@ export default function mapMixin(
mapboxlogo.target = "_blank"
mapboxlogo.innerHTML = "Mapbox"

const existingLogo = document.getElementsByClassName('mapbox-maplogo')
if(existingLogo.length ) {
const thisMapContainer = _map._container
Copy link
Contributor

Choose a reason for hiding this comment

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

How certain are we _map will never still be null here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added check for null _map

const existingLogo = document.getElementsByClassName('mapbox-maplogo')
if(existingLogo.length ) {
const thisMapContainer = _map._container
const existingLogo = thisMapContainer.querySelectorAll('.mapbox-maplogo')
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like we could easily just use querySelector instead here, but unlikely to matter

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed because querySelector is better style

Copy link
Contributor

@uyanga-gb uyanga-gb left a comment

Choose a reason for hiding this comment

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

Looks good!

@CaitW CaitW merged commit d9e3420 into master Feb 13, 2019
@CaitW CaitW deleted the caitlin/FE-7750_inconsistent-display-of-mapbox-logo branch February 13, 2019 01:23
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.

None yet

3 participants