Changeset 7023
- Timestamp:
- 04/28/08 15:01:10 (4 months ago)
- Files:
-
- trunk/openlayers/tests/Style.html (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/openlayers/tests/Style.html
r6818 r7023 128 128 129 129 function test_Style_context(t) { 130 t.plan( 1);130 t.plan(2); 131 131 var rule = new OpenLayers.Rule({ 132 132 symbolizer: {"Point": {externalGraphic: "${img1}"}}, … … 146 146 var styleHash = style.createSymbolizer(feature); 147 147 t.eq(styleHash.externalGraphic, "myImage.png", "correctly evaluated rule and calculated property styles from a custom context"); 148 } 149 148 149 // same as above, but without rule (#1526) 150 style = new OpenLayers.Style( 151 {externalGraphic: "${getExternalGraphic}"}, 152 {context: { 153 getExternalGraphic: function(feature) { 154 return "foo" + feature.attributes.size + ".png"; 155 } 156 }}); 157 t.eq(style.createSymbolizer(feature).externalGraphic, "foo10.png", "correctly evaluated symbolizer without rule"); 158 }; 159 150 160 function test_Style_findPropertyStyles(t) { 151 161 t.plan(4);
