mirror of
https://github.com/maputnik/editor.git
synced 2025-12-25 07:30:00 +00:00
## Launch Checklist When clicking the map to create a popup and then clicking on the map again without closing the popup something breaks in react. This PR fixes it. Steps to reproduce: 1. Click on the map 2. Click on the map but not on the popup The following malformed popup appears: Before: <img width="610" height="626" alt="image" src="https://github.com/user-attachments/assets/99cbdf9a-0b3c-436d-ab13-f219ee3c6e75" /> After - popup looks good. <img width="610" height="626" alt="image" src="https://github.com/user-attachments/assets/6b379c0d-cbbf-40ed-916d-3cc10eaf4410" /> I couldn't make cypress reproduce the exact scenario, but I added some basic tests for popups. - [x] Briefly describe the changes in this PR. - [x] Include before/after visuals or gifs if this PR includes visual changes. - [x] Write tests for all new functionality. - [x] Add an entry to `CHANGELOG.md` under the `## main` section. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
93 lines
2.1 KiB
JSON
93 lines
2.1 KiB
JSON
{
|
|
"version": 8,
|
|
"sources": {
|
|
"rectangles": {
|
|
"type": "geojson",
|
|
"data": {
|
|
"type": "FeatureCollection",
|
|
"features": [
|
|
{
|
|
"type": "Feature",
|
|
"properties": {},
|
|
"geometry": {
|
|
"type": "Polygon",
|
|
"coordinates": [
|
|
[
|
|
[
|
|
-130.78125,
|
|
-33.13755119234615
|
|
],
|
|
[
|
|
-130.78125,
|
|
63.548552232036414
|
|
],
|
|
[
|
|
15.468749999999998,
|
|
63.548552232036414
|
|
],
|
|
[
|
|
15.468749999999998,
|
|
-33.13755119234615
|
|
],
|
|
[
|
|
-130.78125,
|
|
-33.13755119234615
|
|
]
|
|
]
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "Feature",
|
|
"properties": {},
|
|
"geometry": {
|
|
"type": "Polygon",
|
|
"coordinates": [
|
|
[
|
|
[
|
|
-48.515625,
|
|
-54.97761367069625
|
|
],
|
|
[
|
|
-48.515625,
|
|
36.5978891330702
|
|
],
|
|
[
|
|
169.45312499999997,
|
|
36.5978891330702
|
|
],
|
|
[
|
|
169.45312499999997,
|
|
-54.97761367069625
|
|
],
|
|
[
|
|
-48.515625,
|
|
-54.97761367069625
|
|
]
|
|
]
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"layers": [
|
|
{
|
|
"id": "background",
|
|
"type": "background",
|
|
"paint": {
|
|
"background-color": "white"
|
|
}
|
|
},
|
|
{
|
|
"id": "rectangles",
|
|
"type": "fill",
|
|
"source": "rectangles",
|
|
"paint": {
|
|
"fill-opacity": 0.3
|
|
}
|
|
}
|
|
]
|
|
}
|