Only call dashStyle when strokeDashstyle is set. r=tschaub (closes #2768)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10621 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -345,7 +345,6 @@ OpenLayers.Renderer = OpenLayers.Class({
|
||||
* strokeColor: "#000000",
|
||||
* strokeOpacity: 1,
|
||||
* strokeWidth: 1,
|
||||
* strokeDashstyle: "solid",
|
||||
* pointRadius: 3,
|
||||
* graphicName: "square"
|
||||
* };
|
||||
@@ -357,7 +356,6 @@ OpenLayers.Renderer.defaultSymbolizer = {
|
||||
strokeWidth: 2,
|
||||
fillOpacity: 1,
|
||||
strokeOpacity: 1,
|
||||
strokeDashstyle: "solid",
|
||||
pointRadius: 0
|
||||
};
|
||||
|
||||
|
||||
@@ -371,8 +371,8 @@ OpenLayers.Renderer.SVG = OpenLayers.Class(OpenLayers.Renderer.Elements, {
|
||||
// Hard-coded linejoin for now, to make it look the same as in VML.
|
||||
// There is no strokeLinejoin property yet for symbolizers.
|
||||
node.setAttributeNS(null, "stroke-linejoin", "round");
|
||||
node.setAttributeNS(null, "stroke-dasharray", this.dashStyle(style,
|
||||
widthFactor));
|
||||
style.strokeDashstyle && node.setAttributeNS(null,
|
||||
"stroke-dasharray", this.dashStyle(style, widthFactor));
|
||||
} else {
|
||||
node.setAttributeNS(null, "stroke", "none");
|
||||
}
|
||||
|
||||
@@ -329,7 +329,9 @@ OpenLayers.Renderer.VML = OpenLayers.Class(OpenLayers.Renderer.Elements, {
|
||||
stroke.opacity = style.strokeOpacity;
|
||||
stroke.endcap = style.strokeLinecap == 'butt' ? 'flat' :
|
||||
(style.strokeLinecap || 'round');
|
||||
stroke.dashstyle = this.dashStyle(style);
|
||||
if (style.strokeDashstyle) {
|
||||
stroke.dashstyle = this.dashStyle(style);
|
||||
}
|
||||
}
|
||||
|
||||
if (style.cursor != "inherit" && style.cursor != null) {
|
||||
|
||||
@@ -40,7 +40,7 @@ OpenLayers.Symbolizer.Line = OpenLayers.Class(OpenLayers.Symbolizer, {
|
||||
* "longdash", "longdashdot", or "solid") will not work in SLD, but
|
||||
* most SLD patterns will render correctly in OpenLayers.
|
||||
*/
|
||||
strokeDashstyle: "solid",
|
||||
strokeDashstyle: null,
|
||||
|
||||
/**
|
||||
* Constructor: OpenLayers.Symbolizer.Line
|
||||
|
||||
@@ -40,7 +40,7 @@ OpenLayers.Symbolizer.Point = OpenLayers.Class(OpenLayers.Symbolizer, {
|
||||
* "longdash", "longdashdot", or "solid") will not work in SLD, but
|
||||
* most SLD patterns will render correctly in OpenLayers.
|
||||
*/
|
||||
strokeDashstyle: "solid",
|
||||
strokeDashstyle: null,
|
||||
|
||||
/**
|
||||
* APIProperty: fillColor
|
||||
|
||||
@@ -40,7 +40,7 @@ OpenLayers.Symbolizer.Polygon = OpenLayers.Class(OpenLayers.Symbolizer, {
|
||||
* "longdash", "longdashdot", or "solid") will not work in SLD, but
|
||||
* most SLD patterns will render correctly in OpenLayers.
|
||||
*/
|
||||
strokeDashstyle: "solid",
|
||||
strokeDashstyle: null,
|
||||
|
||||
/**
|
||||
* APIProperty: fillColor
|
||||
|
||||
Reference in New Issue
Block a user