Open jgrocha opened 9 years ago
I currently don't have time to look into this, sorry. I hope to find time for this next week. Others are free to revoew of course.
Hi @jgrocha, thanks a lot for your contribution! This seems to be a great addition for the tree package of GeoExt.
Besides some minor issues which I addressed directly as line comments (see above) I have some major points which should be done before we can merge this:
Hey @jgrocha do you think you can tackle the comments of @chrismayer?
Hi devs,
I recovered these two classes that help create a layer tree, from an
group
attribute. I also add an example of usage, togeoext2/examples/tree/
.The only change in the existing code proposed in the PR is an additional protection (if clause) in
src/GeoExt/tree/Util.js
,updateLayerVisibilityByNode
function, to make sure that we have a layer associated with the node before checking the layer's visibility. I think this test is necessary, since we might have nodes in the tree (not leafs) without a layer.The two classes proposed in this PR are:
GeoExt.tree.LayerTreeBuilder
that extendsGeoExt.tree.Panel
GeoExt.tree.LayerGroupContainer
that extendsGeoExt.tree.LayerContainer
Comments are welcome.