OpenLayers OpenLayers

Changeset 6317

Show
Ignore:
Timestamp:
02/17/08 09:49:37 (10 months ago)
Author:
ahocevar
Message:

New minimumSymbolizer object on Renderer.Elements, which defines only those properties that are needed to ensure that nothing breaks. r=tschaub (closes #1345)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/openlayers/lib/OpenLayers/Renderer/Elements.js

    r5772 r6317  
    4141     */     
    4242    xmlns: null, 
     43     
     44    /** 
     45     * Property: minimumSymbolizer 
     46     * {Object} 
     47     */ 
     48    minimumSymbolizer: { 
     49        strokeLinecap: "round", 
     50        strokeOpacity: 1, 
     51        fillOpacity: 1, 
     52        pointRadius: 0 
     53    }, 
    4354     
    4455    /** 
     
    162173    drawGeometryNode: function(node, geometry, style) { 
    163174        style = style || node._style; 
     175        OpenLayers.Util.applyDefaults(style, this.minimumSymbolizer); 
    164176 
    165177        var options = { 
  • trunk/openlayers/lib/OpenLayers/Renderer/VML.js

    r6161 r6317  
    198198                fill = this.createNode('v:fill', node.id + "_fill"); 
    199199            } 
    200  
    201             if (style.fillOpacity) { 
    202                 fill.setAttribute("opacity", style.fillOpacity); 
    203             } 
     200            fill.setAttribute("opacity", style.fillOpacity); 
    204201 
    205202            if (node._geometryClass == "OpenLayers.Geometry.Point" && 
     
    243240                node.appendChild(stroke); 
    244241            } 
    245             if (style.strokeOpacity) { 
    246                 stroke.setAttribute("opacity", style.strokeOpacity); 
    247             } 
     242            stroke.setAttribute("opacity", style.strokeOpacity); 
    248243            stroke.setAttribute("endcap", !style.strokeLinecap || style.strokeLinecap == 'butt' ? 'flat' : style.strokeLinecap); 
    249244        } 
     
    411406     */ 
    412407    drawCircle: function(node, geometry, radius) { 
    413         if (typeof radius == "undefined") { 
    414             radius = 0; 
    415         } 
    416408        if(!isNaN(geometry.x)&& !isNaN(geometry.y)) { 
    417409            var resolution = this.getResolution();