-
-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Description
Suppose you have a TileLayer that gets stamped with ID 10, and a TileLayer that gets stamped with ID 1. You first add 10, then 1: the document order of the layer container elements should be, and is, 10, 1. Now a viewreset event is fired. This section of code is triggered. The iteration order for object properties is undefined. Chrome happens to iterate "1" before "10". Layer 1 is reset, causing its container to be reappended (tilePane.empty is true). Then layer 10 is reset, causing its container to be reappended. The result is a document order of 1, 10, the opposite of the correct order.