From ff8b35663809331ac5800ebebd28a7b0489e97fb Mon Sep 17 00:00:00 2001 From: bartvde Date: Tue, 23 Mar 2010 08:19:11 +0000 Subject: [PATCH] fix up Layer.Vector tests in IE which were broken as of r10039, r=elemoine (closes #2465) git-svn-id: http://svn.openlayers.org/trunk/openlayers@10141 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- tests/Layer/Vector.html | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/tests/Layer/Vector.html b/tests/Layer/Vector.html index dff6bed7a1..f40f9b1109 100644 --- a/tests/Layer/Vector.html +++ b/tests/Layer/Vector.html @@ -568,6 +568,8 @@ "height is set correctly"); feature.style = customStyle4; layer.drawFeature(feature); + var left = parseInt(root.firstChild.style.left); + var top = parseInt(root.firstChild.style.top); t.eq(root.firstChild.style.height, customStyle4.graphicHeight.toString()+'px', "given graphicHeight and graphicWidth, both are set: height"); @@ -591,15 +593,10 @@ "graphicOpacity correctly set"); feature.style = customStyle6; layer.drawFeature(feature); - var x = geometryX / renderer.getResolution(); - var y = geometryY / renderer.getResolution(); - t.eq(root.firstChild.style.left, - (x + customStyle6.graphicXOffset).toFixed().toString()+'px', - "graphicXOffset correctly set"); - - t.eq(root.firstChild.style.top, - (y - (customStyle6.graphicYOffset+parseInt(root.firstChild.style.height))).toFixed().toString()+'px', - "graphicYOffset correctly set"); + var offsetLeft = parseInt(root.firstChild.style.left); + var offsetTop = parseInt(root.firstChild.style.top); + t.eq((offsetLeft-left)*2, customStyle6.graphicXOffset, "graphicXOffset correctly set"); + t.eq((top-offsetTop)*2, customStyle6.graphicYOffset, "graphicYOffset correctly set"); } }