allow for setting opacity of alpha image divs. also give both Icon and Marker setOpacity() functions. added tests and modified examples/markers.html to show how to do it.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1541 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -24,6 +24,18 @@
|
||||
t.eq( cloned.url, "b", "cloned.url does change when edited" );
|
||||
}
|
||||
|
||||
function test_02_Marker_setOpacity(t) {
|
||||
t.plan( 2 );
|
||||
|
||||
icon = new OpenLayers.Icon("a",new OpenLayers.Size(5,6));
|
||||
|
||||
t.ok(!icon.imageDiv.style.opacity, "default icon has no opacity");
|
||||
|
||||
icon.setOpacity(0.5);
|
||||
|
||||
t.eq(icon.imageDiv.style.opacity + "", "0.5", "icon.setOpacity() works");
|
||||
}
|
||||
|
||||
// -->
|
||||
</script>
|
||||
</head>
|
||||
|
||||
Reference in New Issue
Block a user