Two calls to draw() are necessary for the polygonLayer to get it to pick up style functions applied to the layer. This shouldn't happen, and we aren't sure what caused it. The bug was discovered on #355 where an extra reactivity loop update was making the second call, hiding the bug. That change eliminated the extra loop, causing this to appear.
It's always the second render loop. If you disable the default updateLayers in LayerManager it won't draw anything in the beginning, on first update only text, then the second update it will do rects. So that eliminates any weird timing issues with loading the data.
The Polygon webGL render has RGB data for the color of lines. Looks like I can grab out of the renderer in there a color that corresponds with the type color.
I've traced the issue to createStyle -- basically when the app loads, the rectangles don't get drawn. If you touch basically anything, they appear. checkbox, visibility controls, even clicking the right region of the screen to trigger selection.
Two calls to
draw()are necessary for the polygonLayer to get it to pick up style functions applied to the layer. This shouldn't happen, and we aren't sure what caused it. The bug was discovered on #355 where an extra reactivity loop update was making the second call, hiding the bug. That change eliminated the extra loop, causing this to appear.