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:
euzuro
2006-10-03 17:36:03 +00:00
parent 634588abf0
commit 348b0b388d
7 changed files with 90 additions and 10 deletions

View File

@@ -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>