Skip to content

Popup: Fix z-index in any case#161

Open
louismaximepiton wants to merge 2 commits intoOrange-OpenSource:mainfrom
louismaximepiton:main-lmp-popup-zindex-fix
Open

Popup: Fix z-index in any case#161
louismaximepiton wants to merge 2 commits intoOrange-OpenSource:mainfrom
louismaximepiton:main-lmp-popup-zindex-fix

Conversation

@louismaximepiton
Copy link
Member

Description

There are two solutions to answer the #34 issue:

  1. The first one is to remove

    this.setZIndexOffset((selected) ? 100 : 0)

    This way seems more logical, but the following could happen:
    image

  2. The second one is to increase the zindexOffset of the same line to 1000000 as what was done inside the PR to avoid the case illustrated above.
    This looks to be mandatory because of this line on Markercluster side:
    https://github.com/Leaflet/Leaflet.markercluster/blob/bd2794c35831612a86f63766c26d94f809de7abc/src/MarkerCluster.Spiderfier.js#L237

Maybe we can handle this in a different way but this seemed the more logical to me right now

How to test

Change id: 's2' to get the following:

location: {
  lat: 44.892,
  lng: 4.872
},

Related issues

Fixes #34.

@louismaximepiton louismaximepiton force-pushed the main-lmp-popup-zindex-fix branch from 994a7ac to 03a086f Compare February 21, 2024 09:38
@netlify
Copy link

netlify bot commented Feb 26, 2024

Deploy Preview for iotmapcomponent ready!

Name Link
🔨 Latest commit be40072
🔍 Latest deploy log https://app.netlify.com/sites/iotmapcomponent/deploys/65dc9a8666fd6700080b0f79
😎 Deploy Preview https://deploy-preview-161--iotmapcomponent.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

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.

Markercluster group: popup is displayed under the other markers

1 participant