[OpenLayers-Commits] r1831 - sandbox/vector/lib/OpenLayers

commits at openlayers.org commits at openlayers.org
Tue Nov 14 01:53:01 EST 2006


Author: bertil
Date: 2006-11-14 01:53:01 -0500 (Tue, 14 Nov 2006)
New Revision: 1831

Modified:
   sandbox/vector/lib/OpenLayers/Style.js
Log:
style class update

Modified: sandbox/vector/lib/OpenLayers/Style.js
===================================================================
--- sandbox/vector/lib/OpenLayers/Style.js	2006-11-14 06:52:22 UTC (rev 1830)
+++ sandbox/vector/lib/OpenLayers/Style.js	2006-11-14 06:53:01 UTC (rev 1831)
@@ -20,35 +20,51 @@
     pointRadius: 1,
     pointUnit: "%",
     hoverPointRadius: 1,
-    hoverPointUnit: "%"
+    hoverPointUnit: "%",
+    pointerEvents: "visiblePainted"
 };
+
 OpenLayers.Style.prototype = {
-   
     initialize: function(object) {
-        var hash = Object.extend(OpenLayers.Style.DefaultProperties, object || {});
-        Object.extend(hash, Enumerable);
-        Object.extend(hash, Hash);
-        Object.extend(this, hash);
+        var hash = OpenLayers.Util.extend(OpenLayers.Style.DefaultProperties, object || {});
+        
+        // todo, broke the Hash and Enumerable prototype dependency
+        OpenLayers.Util.extend(hash, Enumerable);
+        OpenLayers.Util.extend(hash, Hash);
+        OpenLayers.Util.extend(this, hash);
     }
 }
 
 /*
  * Global styles
  */
+
 OpenLayers.Style.DefaultRendererStyle = new OpenLayers.Style();
 OpenLayers.Style.DefaultRendererSnappingSegmentStyle = new OpenLayers.Style({               
     strokeColor: "white",
     strokeOpacity: 0.5,
-    strokeWidth: 6,
+    strokeWidth: 3,
     strokeUnit: "%",           
     pointRadius: 0.1,
     pointUnit: "%"
 });
 OpenLayers.Style.DefaultRendererSnappingPointStyle = new OpenLayers.Style({
+    fillColor: "blue",
+    fillOpacity: 1,
     strokeColor: "blue",    
     strokeOpacity: 1,   
     strokeWidth: 0.2,   
     strokeUnit: "%",                    
-    pointRadius: 0.2,
+    pointRadius: 0.5,
     pointUnit: "%"
+});
+OpenLayers.Style.DefaultRendererTemporaryElementStyle = new OpenLayers.Style({
+    fillOpacity: 0,
+    strokeColor: "yellow",
+    strokeOpacity: 1,
+    strokeWidth: 0.2,   
+    strokeUnit: "%",                    
+    pointRadius: 1,
+    pointUnit: "%",
+    pointerEvents: "none"
 });
\ No newline at end of file



More information about the Commits mailing list