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:
@@ -59,6 +59,7 @@
|
||||
}
|
||||
|
||||
var r = new OpenLayers.Renderer.SVG(document.body);
|
||||
r.setSize(new OpenLayers.Size(4,4));
|
||||
r.map = {
|
||||
getResolution: function() {
|
||||
return 0.5;
|
||||
@@ -78,7 +79,7 @@
|
||||
// test extent changes
|
||||
var extent = new OpenLayers.Bounds(4,3,2,1);
|
||||
r.setExtent(extent);
|
||||
t.eq(r.rendererRoot.getAttributeNS(null, "viewBox"), "6 6 -4 -4", "rendererRoot viewBox is correct after a new setExtent");
|
||||
t.eq(r.rendererRoot.getAttributeNS(null, "viewBox"), "6 6 4 4", "rendererRoot viewBox is correct after a new setExtent");
|
||||
|
||||
OpenLayers.Renderer.Elements.prototype.setExtent =
|
||||
OpenLayers.Renderer.Elements.prototype._setExtent;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user