mirror of
https://github.com/maputnik/editor.git
synced 2026-09-11 14:57:26 +00:00
Fix layer group expansion state after deletion (#2146)
Deleting a layer changes the starting indices of later groups, so their stored expansion state no longer matches. Preserve that state through surviving layer IDs when rebuilding the group keys. This keeps expanded groups open after deleting an earlier layer or the first layer of a group. Separate groups with the same prefix retain their own states; if deletion joins two groups, the merged group stays expanded when either was expanded. - Fixes #1781. Adds five deletion regression tests, a small style fixture, and a changelog entry. Validation: - All 33 layer-list E2E tests and 50 unit tests pass. - Lint and the production build, including TypeScript checking, pass. - Manually checked OSM Liberty: all 15 groups remain expanded after deleting the background layer. - The full E2E suite reports 160 passing tests and one failure in `modals > open > upload` (`Could not get styleItem from localStorage`). The same failure reproduces with the original production code restored. --------- Co-authored-by: Harel M <harel.mazor@gmail.com>
This commit is contained in:
committed by
GitHub
parent
0a4c1710e2
commit
1301dc03e7
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"version": 8,
|
||||
"name": "Grouped layers",
|
||||
"sources": {},
|
||||
"layers": [
|
||||
{ "id": "background", "type": "background" },
|
||||
{ "id": "park-a", "type": "background" },
|
||||
{ "id": "park-b", "type": "background" },
|
||||
{ "id": "park-c", "type": "background" },
|
||||
{ "id": "road", "type": "background" },
|
||||
{ "id": "park-d", "type": "background" },
|
||||
{ "id": "park-e", "type": "background" },
|
||||
{ "id": "water-a", "type": "background" },
|
||||
{ "id": "water-b", "type": "background" }
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user