[OpenLayers-Commits] r7523 - sandbox/topp/trimet/lib/OpenLayers/Layer
commits at openlayers.org
commits at openlayers.org
Wed Jul 16 09:30:15 EDT 2008
Author: tschaub
Date: 2008-07-16 09:30:15 -0400 (Wed, 16 Jul 2008)
New Revision: 7523
Modified:
sandbox/topp/trimet/lib/OpenLayers/Layer/Vector.js
Log:
Only trigger refresh on layer if in range and visible.
Modified: sandbox/topp/trimet/lib/OpenLayers/Layer/Vector.js
===================================================================
--- sandbox/topp/trimet/lib/OpenLayers/Layer/Vector.js 2008-07-16 13:26:33 UTC (rev 7522)
+++ sandbox/topp/trimet/lib/OpenLayers/Layer/Vector.js 2008-07-16 13:30:15 UTC (rev 7523)
@@ -264,14 +264,17 @@
/**
* Method: refresh
- * Ask the layer to request features again and redraw them.
+ * Ask the layer to request features again and redraw them. Triggers
+ * the refresh event if the layer is in range and visible.
*
* Parameters:
* event - {Object} Optional object with properties for any listener of
* the refresh event.
*/
refresh: function(event) {
- this.events.triggerEvent("refresh", event);
+ if(this.inRange && this.visible) {
+ this.events.triggerEvent("refresh", event);
+ }
},
/**
More information about the Commits
mailing list