[OpenLayers-Commits] r11649 - trunk/openlayers/lib/OpenLayers/Layer

commits-20090109 at openlayers.org commits-20090109 at openlayers.org
Mon Mar 7 06:31:52 EST 2011


Author: fredj
Date: 2011-03-07 03:31:51 -0800 (Mon, 07 Mar 2011)
New Revision: 11649

Modified:
   trunk/openlayers/lib/OpenLayers/Layer/Vector.js
Log:
don't crash if OpenLayers.Renderer.NG is not defined. r=crschmidt (closes #3152)

Modified: trunk/openlayers/lib/OpenLayers/Layer/Vector.js
===================================================================
--- trunk/openlayers/lib/OpenLayers/Layer/Vector.js	2011-03-07 11:22:44 UTC (rev 11648)
+++ trunk/openlayers/lib/OpenLayers/Layer/Vector.js	2011-03-07 11:31:51 UTC (rev 11649)
@@ -472,7 +472,7 @@
     moveTo: function(bounds, zoomChanged, dragging) {
         OpenLayers.Layer.prototype.moveTo.apply(this, arguments);
         
-        var ng = (this.renderer instanceof OpenLayers.Renderer.NG);
+        var ng = (OpenLayers.Renderer.NG && this.renderer instanceof OpenLayers.Renderer.NG);
         if (ng) {
             zoomChanged && this.renderer.updateDimensions();
         } else {
@@ -522,7 +522,7 @@
      * {Boolean} The layer was redrawn.
      */
     redraw: function() {
-        if (this.renderer instanceof OpenLayers.Renderer.NG) {
+        if (OpenLayers.Renderer.NG && this.renderer instanceof OpenLayers.Renderer.NG) {
             this.drawn = false;
         }
         return OpenLayers.Layer.prototype.redraw.apply(this, arguments);



More information about the Commits mailing list