From 26ef972199a6b2d3b74ecbb79921cc831bbdba25 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Mon, 3 Dec 2012 10:49:54 -0500 Subject: [PATCH] Restore map.surface Fixes #166 --- js/id/renderer/map.js | 3 ++- test/spec/Map.js | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/js/id/renderer/map.js b/js/id/renderer/map.js index 8ac6e494d..bfd11d1ac 100644 --- a/js/id/renderer/map.js +++ b/js/id/renderer/map.js @@ -81,6 +81,8 @@ iD.Map = function() { map.size(this.size()); hideInspector(); + + map.surface = surface; } map.history = iD.History(); @@ -532,7 +534,6 @@ iD.Map = function() { return map; }; - map.surface = surface; map.background = background; map.projection = projection; map.redraw = redraw; diff --git a/test/spec/Map.js b/test/spec/Map.js index 53672d318..40ecd50b4 100644 --- a/test/spec/Map.js +++ b/test/spec/Map.js @@ -60,4 +60,10 @@ describe('Map', function() { expect(map.extent()[1][0]).toBeCloseTo(36); }); }); + + describe("surface", function() { + it("is an SVG element", function() { + expect(map.surface.node().tagName).toEqual("svg"); + }); + }); });