[OpenLayers-Commits] r5107 - sandbox/ahocevar/sldRenderer/lib/OpenLayers/Control

commits at openlayers.org commits at openlayers.org
Sat Nov 3 08:08:43 EDT 2007


Author: ahocevar
Date: 2007-11-03 08:08:41 -0400 (Sat, 03 Nov 2007)
New Revision: 5107

Modified:
   sandbox/ahocevar/sldRenderer/lib/OpenLayers/Control/SelectFeature.js
Log:
incorporate functionality proposed in #1120

Modified: sandbox/ahocevar/sldRenderer/lib/OpenLayers/Control/SelectFeature.js
===================================================================
--- sandbox/ahocevar/sldRenderer/lib/OpenLayers/Control/SelectFeature.js	2007-11-03 12:07:49 UTC (rev 5106)
+++ sandbox/ahocevar/sldRenderer/lib/OpenLayers/Control/SelectFeature.js	2007-11-03 12:08:41 UTC (rev 5107)
@@ -176,10 +176,13 @@
             feature.originalStyle = feature.style;
         }
         this.layer.selectedFeatures.push(feature);
-        if (this.selectStyle instanceof OpenLayers.Style) {
-            feature.style = this.selectStyle.createStyle(feature, this.selectStyle.defaultSelectStyle);
+        
+        var selectStyle = feature.selectStyle || this.selectStyle;
+        if (selectStyle instanceof OpenLayers.Style) {
+            feature.style = selectStyle.createStyle(feature,
+                    selectStyle.defaultSelectStyle);
         } else {
-            feature.style = this.selectStyle;
+            feature.style = selectStyle;
         }
         this.layer.drawFeature(feature);
         this.onSelect(feature);



More information about the Commits mailing list