geoext / geoext2

GeoExt 2 — JavaScript Toolkit for Rich Web Mapping Applications
http://geoext.github.io/geoext2/
Other
142 stars 106 forks source link

Fix JavaScript error when the map panel is loaded in a hidden ExtJS tab #367

Closed vog closed 8 years ago

vog commented 8 years ago

When the map panel is loaded in an initially hidden ExtJS tab, the owner tree is not yet rendered, so call to "node.getOwnerTree()" returns undefined. This caused an error message when trying to call "node.getOwnerTree().getChecked()".

chrismayer commented 8 years ago

Hi @vog.

Thanks for your contribution! This looks good to me, but I would like to hear a little comment of @KaiVolland since he was also involved a lot in this part of the library (and of course of everyone else).

Another important point: Did you already sign a Contributor Agreement? The GeoExt project requires that all contributors sign the agreement below and email a scanned copy to the GeoExt Project Steering Committee (psc [at] geoext.org). You can donwload it here

marcjansen commented 8 years ago

In addition to @chrismayer's comments, will everything work as expected once the panel is shown? Or do we need a one time listener on the show event?

Note for possible mergers: this may need a backport to the stable branch.

KaiVolland commented 8 years ago

It seems to just avoid the javascript error and not changing anything, so i don't see any disadvantages of this change. When @marcjansen s question is answererd and the Contributor Agreement is signed we should merge this.

vog commented 8 years ago

I can confirm that I tested this patch and that it is used in an application for a customer.

Regarding the Contributor Agreement, I believe I already signed it. Also note that this is not my first pull request on geoext2: #19, #21, #61, #170, #171

marcjansen commented 8 years ago

this is not my first pull request on geoext2: …

You must have switched avatars then :-)

This is good to go then. Thanks for this contribution, @vog.

marcjansen commented 8 years ago

Note for possible mergers: this may need a backport to the stable branch.

Here is the backport PR: #368