Fixing Util.getRenderedDimensions so it assigns units to positional values. Thanks Wally for the report. r=euzuro (closes #1570)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@7329 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -782,6 +782,20 @@
|
||||
t.ok(ret == g_TestVal3, "try returns first sucessfully executed function's return");
|
||||
|
||||
}
|
||||
|
||||
function test_getRenderedDimensions(t) {
|
||||
t.plan(2);
|
||||
var content = (new Array(100)).join("foo ");
|
||||
|
||||
// test with fixed width
|
||||
var fw = OpenLayers.Util.getRenderedDimensions(content, {w: 20});
|
||||
t.eq(fw.w, 20, "got the fixed width");
|
||||
|
||||
// test with fixed height
|
||||
var fh = OpenLayers.Util.getRenderedDimensions(content, {h: 15});
|
||||
t.eq(fh.h, 15, "got the fixed height");
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
|
||||
Reference in New Issue
Block a user