r439@creusa: crschmidt | 2006-05-29 13:32:54 -0400
Change Layer.js to call a moveTo function after visibility changes: This allows us to implement #56. Layer/Grid.js now has code which shows how to have a layer which doesn't load when it's not visible: This code will be dependant on the layers, so this has to be implemented per class. However, classes like markers suffer very little performance cost for drawing, so Layer.Grid is the most important place for this improvement. git-svn-id: http://svn.openlayers.org/trunk/openlayers@458 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -58,6 +58,7 @@ OpenLayers.Layer.prototype = {
|
||||
*/
|
||||
setVisibility: function(visible) {
|
||||
this.div.style.display = (visible) ? "block" : "none";
|
||||
this.moveTo(this.map.getExtent());
|
||||
},
|
||||
|
||||
/** @final @type String */
|
||||
|
||||
Reference in New Issue
Block a user