Commit Fix for #654: Layer should not redraw on setVisibility(false). For

some layers, this is a significant performance enhancement. Includes regression
tests.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@3041 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2007-04-10 10:30:49 +00:00
parent df65488d3a
commit 4968e0e59c
2 changed files with 18 additions and 2 deletions

View File

@@ -347,7 +347,7 @@ OpenLayers.Layer.prototype = {
if (visibility != this.visibility) {
this.visibility = visibility;
this.display(visibility);
if (this.map != null) {
if (visibility && this.map != null) {
var extent = this.map.getExtent();
if (extent != null) {
this.moveTo(extent, true);