geoext / geoext2

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

Add fallback for ExtJS5 to return the layer. #392

Closed KaiVolland closed 2 years ago

KaiVolland commented 7 years ago

This is a small PR which adds a fallback to the getLayer() method in the LayerModel so it works even if this.raw is undefined. E.g. for ExtJS5.

This resolves #390

chrismayer commented 7 years ago

LGTM @KaiVolland. Thank you!

I wondered a bit why the tests did not fail before with ExtJS5. Did you have a look at that?

KaiVolland commented 7 years ago

I'm not 100% convinced of the testsuite we are using (or the tests we wrote). If i run the tests in chrome or firefox and not in shell some of them fail sometimes and work afterwards... So i'd like to trust travis on that.

Alternatively we could change to:

if(GeoExt.Version.isExt4){
    return this.raw;
} else {
    return this.data;
}
chrismayer commented 7 years ago

I was just curious about the tests. So no worries from my side. Feel free to merge if noone else vetos.

bentrm commented 7 years ago

@KaiVolland, save to merge this?