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

DivOverlay/Popup/Tooltip refactoring and fixes #7540

Merged
merged 2 commits into from Nov 1, 2021

Conversation

johnd0e
Copy link
Collaborator

@johnd0e johnd0e commented Apr 3, 2021

This is continuation of #6613.

  • Fix a couple of edge cases
  • Make _prepareOpen-related code logic more clear
  • Allow to prevent overlay opening gracefully on some conditions (like empty FeatureGroup)
  • Refactor to avoid of undocumented arguments for public methods

This change is Reviewable

Copy link
Member

@Falke-Design Falke-Design left a comment

Choose a reason for hiding this comment

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

A few things but looks good for me

src/layer/DivOverlay.js Outdated Show resolved Hide resolved
src/layer/DivOverlay.js Show resolved Hide resolved
src/layer/DivOverlay.js Outdated Show resolved Hide resolved
src/layer/DivOverlay.js Outdated Show resolved Hide resolved
src/layer/Popup.js Show resolved Hide resolved
@johnd0e johnd0e force-pushed the overlay-arguments branch 2 times, most recently from e33ca9c to 750b66b Compare November 1, 2021 10:15
johndoe added 2 commits November 1, 2021 13:20
1. Fix a couple of edge cases:
   - layer is empty FeatureGroup
   - FeatureGroup contains layers that are not on map

2. Make code logic more clear:
   - get rid of redundant first argument, as bound overlay always contains _source prop.
   - rename `layer` to `source` for the sake of clarity.
   - openPopup/Tooltip: rename `layer` to `target` for the sake of clarity.

3. Allow to prevent overlay opening gracefully on some conditions (like empty FeatureGroup)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

3 participants