d3 style map

This commit is contained in:
John Firebaugh
2012-12-02 14:12:30 -08:00
parent aeb288fe4e
commit 2b1559bb96
3 changed files with 68 additions and 42 deletions
+10 -1
View File
@@ -3,13 +3,22 @@ describe('Map', function() {
beforeEach(function() {
container = d3.select('body').append('div');
map = iD.Map(container.node());
map = iD.Map();
container.call(map);
});
afterEach(function() {
container.remove();
});
describe('#connection', function() {
it('gets and sets connection', function() {
var connection = {};
expect(map.connection(connection)).toBe(map);
expect(map.connection()).toBe(connection);
});
});
describe('#zoom', function() {
it('gets and sets zoom level', function() {
expect(map.zoom(4)).toEqual(map);