made coordsize positive for vector renderers; seems to fixe some strange behavior in the vml renderer, and brings a performance gain by using this.size instead of calculating the size from extent and resolution every time. r=euzuro (closes #1157)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@7586 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
ahocevar
2008-07-29 15:12:48 +00:00
parent 6f2818252c
commit a0b8a41d5d
4 changed files with 26 additions and 9 deletions
+3 -2
View File
@@ -59,6 +59,7 @@
}
var r = new OpenLayers.Renderer.VML(document.body);
r.setSize(new OpenLayers.Size(4,4));
r.map = {
getResolution: function() {
return 0.5;
@@ -70,8 +71,8 @@
t.eq(g_SetExtent, true, "Elements.setExtent() called");
t.ok(r.root.coordorigin == "2,8", "coordorigin is correct");
t.ok(r.root.coordsize == "4,-4", "coordsize is correct");
t.ok(r.root.coordorigin == "2,4", "coordorigin is correct");
t.ok(r.root.coordsize == "4,4", "coordsize is correct");
OpenLayers.Renderer.Elements.prototype.setExtent =
OpenLayers.Renderer.Elements.prototype._setExtent;