Skip to content

BGDIINF_SB-2660: Fixed index out of bounds exceptions when adding layers#286

Merged
pakb merged 1 commit intodevelopfrom
bugfix-2660-index-out-of-bounds-in-addlayertomap
Nov 16, 2022
Merged

BGDIINF_SB-2660: Fixed index out of bounds exceptions when adding layers#286
pakb merged 1 commit intodevelopfrom
bugfix-2660-index-out-of-bounds-in-addlayertomap

Conversation

@jedef
Copy link
Contributor

@jedef jedef commented Nov 8, 2022

Do not set the z-index anymore by reordering the layers in the layers array, but by setting the zIndex property of the layer, so the z indicies can be set to anything without having to fear to throw an index out of bounds exception.

This new way of definining the z indices has also the advantage that the z indices do not need to follow a strict chronological order anymore. But I haven't tried to simplify this code for the moment.

Test link

@github-actions github-actions bot added the bug label Nov 8, 2022
Do not set the z-index anymore by reordering the layers in the layers
array, but by setting the zIndex property of the layer, so the z
indicies can be set to anything without having to fear to throw an index
out of bounds exception.
@pakb pakb force-pushed the bugfix-2660-index-out-of-bounds-in-addlayertomap branch from 185b0d5 to 2be0b8d Compare November 16, 2022 12:48
@pakb pakb merged commit 8a01161 into develop Nov 16, 2022
@pakb pakb deleted the bugfix-2660-index-out-of-bounds-in-addlayertomap branch November 16, 2022 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants