Add Entity#geometry, use in inspector

Fixes the icon for areas, but breaks it for vertices.
Needs a big-vertex sprite.
This commit is contained in:
John Firebaugh
2013-01-02 21:53:51 -08:00
parent 2a6145ef10
commit 62efa1948e
5 changed files with 31 additions and 8 deletions
+10
View File
@@ -36,4 +36,14 @@ describe('iD.Node', function () {
expect(iD.Node({loc: [0, 0]}).intersects([[100, 90], [180, -90]])).to.equal(false);
});
});
describe("#geometry", function () {
it("returns 'vertex' if the node is not a point", function () {
expect(iD.Node().geometry()).to.equal('vertex');
});
it("returns 'point' if the node is a point", function () {
expect(iD.Node({_poi: true}).geometry()).to.equal('point');
});
});
});