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

Add option to specify Marker's shadow pane #6447

Closed
2 tasks done
cherniavskii opened this issue Dec 28, 2018 · 4 comments
Closed
2 tasks done

Add option to specify Marker's shadow pane #6447

cherniavskii opened this issue Dec 28, 2018 · 4 comments

Comments

@cherniavskii
Copy link
Sponsor Collaborator

Issue description extracted from #6312


How to reproduce

Environment

  • Leaflet 1.3.4
  • Firefox 61, Chrome 68

Steps

  1. Create a custom pane (Pane A) with z-index 300.
  2. Create a Marker and specify that it should be added to Pane A.
  3. Create a custom pane (Pane B) with z-index 301.
  4. Create an opaque Rectangle with coordinates/dimensions that overlap the Marker, and specify that the rectangle should be added to Pane B.

What behavior I'm expecting and which behavior I'm seeing

Expected: the marker+shadow in Pane A to be hidden by the rectangle in Pane B, which has a higher z-index.

Actual: the marker's shadow in Pane A is still visible. This is happening because Marker.js:254 is hard-coded to alway add a marker's shadow icon to the shadowPane.

Minimal example reproducing the issue

  • this example is as simple as possible
  • this example does not rely on any third party code

Example: https://plnkr.co/edit/PwS1sNmAfqAXIydn1lFW?p=preview

@cherniavskii
Copy link
Sponsor Collaborator Author

My suggestion is to add a shadowPane option to Marker, so that developers can specify pane for marker's shadow. The default behavior will remain the same - we don't want to break someone's app :)

alexfig added a commit to alexfig/Leaflet that referenced this issue Jan 4, 2019
Add shadowPane option to Marker, so developers can specify pane for marker's shadow as suggested in Leaflet#6447
@ldaws003
Copy link

Hi, is this issue still open, and if so mind if I take a look and try to fix it?

@cherniavskii
Copy link
Sponsor Collaborator Author

Hi Leon,
This issue is still opened, but it's already addressed in #6460

Feel free to explore other issues under good first issue label

cherniavskii pushed a commit that referenced this issue Jan 22, 2019
* Add shadowPane option to Marker

Add shadowPane option to Marker, so developers can specify pane for marker's shadow as suggested in #6447

* Update Marker.js
@cherniavskii
Copy link
Sponsor Collaborator Author

Closed by #6460

Schleuse pushed a commit to Schleuse/Leaflet that referenced this issue Dec 3, 2019
* Add shadowPane option to Marker

Add shadowPane option to Marker, so developers can specify pane for marker's shadow as suggested in Leaflet#6447

* Update Marker.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants