Remove Geometry.Surface
This commit is contained in:
@@ -1,22 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<script src="../OLLoader.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
function test_Surface_constructor (t) {
|
||||
t.plan( 2 );
|
||||
|
||||
var g = new OpenLayers.Geometry.Surface();
|
||||
|
||||
t.eq(g.CLASS_NAME, "OpenLayers.Geometry.Surface", "correct CLASS_NAME")
|
||||
t.ok(OpenLayers.String.startsWith(g.id, "OpenLayers.Geometry.Surface_"),
|
||||
"id correctly set");
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
||||
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -124,7 +124,6 @@
|
||||
<li>Geometry/Point.html</li>
|
||||
<li>Geometry/Polygon.html</li>
|
||||
<li>Geometry/Rectangle.html</li>
|
||||
<li>Geometry/Surface.html</li>
|
||||
<li>Handler.html</li>
|
||||
<li>Handler/Box.html</li>
|
||||
<li>Handler/Click.html</li>
|
||||
|
||||
Reference in New Issue
Block a user