Remove Geometry.Surface

This commit is contained in:
fredj
2011-11-28 12:34:06 +01:00
parent 6f341b1fb5
commit dc991e6f85
12 changed files with 1 additions and 241 deletions
+1 -12
View File
@@ -188,7 +188,7 @@
}
function test_Elements_drawGeometry_2(t) {
t.plan(9);
t.plan(8);
setUp();
@@ -253,17 +253,6 @@
r.drawGeometry(polygon, style);
t.ok(properDraw, "drawGeometry called drawPolygon when passed a polygon");
// surface
var properDraw = false;
r.drawSurface = function(g) {
properDraw = true;
return {};
}
var surface = OpenLayers.Util.applyDefaults({CLASS_NAME: 'OpenLayers.Geometry.Surface'}, geometry);
style = true;
r.drawGeometry(surface, style);
t.ok(properDraw, "drawGeometry called drawSurface when passed a surface");
// rectangle
var properDraw = false;
r.drawRectangle = function(g) {
-34
View File
@@ -297,40 +297,6 @@
t.eq(node.getAttributeNS(null, "height"), "8", "height attribute is correctly set");
}
function test_SVG_drawsurface(t) {
if (!OpenLayers.Renderer.SVG.prototype.supported()) {
t.plan(0);
return;
}
t.plan(3);
var r = new OpenLayers.Renderer.SVG(document.body);
var node = document.createElement('div');
var geometry = {
components: ['foo', 'bar', 'dude']
}
g_GetString = false;
r.getShortString = function(c) {
g_GetString = true;
return c;
}
r.drawSurface(node, geometry);
t.ok(g_GetString, "getShortString is called");
t.eq(node.getAttributeNS(null, "d"), "M foo C bar dude Z", "d attribute is correctly set");
r.getShortString = function(c) {
return false;
}
t.eq(r.drawSurface(node, geometry), false, "drawSurface returns false if one linearRing cannot be drawn");
}
function test_SVG_getcomponentsstring(t) {
if (!OpenLayers.Renderer.SVG.prototype.supported()) {
t.plan(0);
-28
View File
@@ -282,34 +282,6 @@
t.eq(node.getAttributeNS(null, "height"), "4", "height attribute is correctly set");
}
function test_SVG_drawsurface(t) {
if (!OpenLayers.Renderer.SVG2.prototype.supported()) {
t.plan(0);
return;
}
t.plan(2);
var r = new OpenLayers.Renderer.SVG2(document.body);
var node = document.createElement('div');
var geometry = {
components: ['foo', 'bar', 'dude']
}
g_GetString = false;
r.getShortString = function(c) {
g_GetString = true;
return c;
}
r.drawSurface(node, geometry);
t.ok(g_GetString, "getShortString is called");
t.eq(node.getAttributeNS(null, "d"), "M foo C bar dude Z", "d attribute is correctly set");
}
function test_SVG_getcomponentsstring(t) {
if (!OpenLayers.Renderer.SVG2.prototype.supported()) {
t.plan(0);