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

always hide duplicate labels instantly #6166

Merged
merged 2 commits into from
Feb 19, 2018
Merged

always hide duplicate labels instantly #6166

merged 2 commits into from
Feb 19, 2018

Conversation

ansis
Copy link
Contributor

@ansis ansis commented Feb 14, 2018

Duplicate labels were not always hidden instantly, resulting in the same label being rendered twice by different tiles. This fixes that.

port of mapbox/mapbox-gl-native#11207

Launch Checklist

  • briefly describe the changes in this PR
  • write tests for all new functionality
  • [N/A] document any changes to public APIs
  • [N/A] post benchmark scores
  • manually test the debug page

@ansis ansis requested a review from ChrisLoer February 14, 2018 21:04
opacityState = defaultOpacityState;
}

if (!this.opacities[symbolInstance.crossTileID]) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can't we just move this into the else if (!opacityState) clause above and avoid a second lookup? Because it shouldn't be possible for us to have gone down the isDuplicate branch without having first made an entry for this this.opacities[crossTileID] (and if it were possible, it'd be a problem, because we'd be making our initial entry into duplicateOpacityState instead of defaultOpacityState).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep! fixed

Copy link
Contributor

@ChrisLoer ChrisLoer left a comment

Choose a reason for hiding this comment

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

👌

@ansis ansis merged commit 3c04bbe into master Feb 19, 2018
@ansis ansis deleted the fix-duplicate-hiding branch February 19, 2018 15:16
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