no longer overwrite "display" symbolizer properties set by the user in
Style objects. r=elemoine (closes #1898) git-svn-id: http://svn.openlayers.org/trunk/openlayers@8620 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -161,8 +161,6 @@ OpenLayers.Style = OpenLayers.Class({
|
||||
// don't display if there were rules but none applied
|
||||
if(rules.length > 0 && appliedRules == false) {
|
||||
style.display = "none";
|
||||
} else {
|
||||
style.display = "";
|
||||
}
|
||||
|
||||
return style;
|
||||
|
||||
@@ -75,19 +75,19 @@
|
||||
createdStyle = style.createSymbolizer(feature);
|
||||
|
||||
// at this scale, the feature should be green
|
||||
t.eq(createdStyle.display, "", "Feature is visible at scale "+map.getScale());
|
||||
t.eq(createdStyle.display, undefined, "Feature is visible at scale "+map.getScale());
|
||||
t.eq(createdStyle.fillColor, "green", "Point symbolizer from rule applied correctly.");
|
||||
|
||||
map.setCenter(new OpenLayers.LonLat(3,5), 9);
|
||||
// at this scale, the feature should be red
|
||||
createdStyle = style.createSymbolizer(feature);
|
||||
t.eq(createdStyle.display, "", "Feature is visible at scale "+map.getScale());
|
||||
t.eq(createdStyle.display, undefined, "Feature is visible at scale "+map.getScale());
|
||||
t.eq(createdStyle.fillColor, "yellow", "Point symbolizer from rule applied correctly.");
|
||||
|
||||
map.setCenter(new OpenLayers.LonLat(3,5), 8);
|
||||
// at this scale, the feature should be yellow
|
||||
createdStyle = style.createSymbolizer(feature);
|
||||
t.eq(createdStyle.display, "", "Feature is visible at scale "+map.getScale());
|
||||
t.eq(createdStyle.display, undefined, "Feature is visible at scale "+map.getScale());
|
||||
t.eq(createdStyle.fillColor, "red", "Point symbolizer from rule applied correctly.");
|
||||
|
||||
map.setCenter(new OpenLayers.LonLat(3,5), 7);
|
||||
|
||||
Reference in New Issue
Block a user