A classified layer needs to have compiled the data to known its classes/categories.
This commit review the way we build the legend: instead of creating with the whole caption panel, we just set a container and we populate it later. This opens the door for live changing the legend when editing the layer.
But we have to clarify that "reactive" pattern at some point, as we have some concurrent pattern laying around: the render(), which coupled with the schema and this is nice, but for now it's a bit rough (changing the whole UI each time); the propagate way, which is more specific, but not coupled to the schema; the dataChanged; and the onDataLoaded now, which is a bit different, as it's about the data being loaded, not changed/modified, but for the DOM it may at the end be the same. Well, food for thoughts…
fix #2232
A classified layer needs to have compiled the data to known its classes/categories.
This commit review the way we build the legend: instead of creating with the whole caption panel, we just set a container and we populate it later. This opens the door for live changing the legend when editing the layer.
But we have to clarify that "reactive" pattern at some point, as we have some concurrent pattern laying around: the
render()
, which coupled with the schema and this is nice, but for now it's a bit rough (changing the whole UI each time); thepropagate
way, which is more specific, but not coupled to the schema; thedataChanged
; and theonDataLoaded
now, which is a bit different, as it's about the data being loaded, not changed/modified, but for the DOM it may at the end be the same. Well, food for thoughts…