From e22bd1ecebd906c0d37afe31258deee9a994aef2 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Fri, 10 Jun 2016 13:06:28 -0400 Subject: [PATCH] Pass projection to iD.svg.Layers in tests --- test/rendering.html | 8 ++++---- test/spec/svg/areas.js | 2 +- test/spec/svg/lines.js | 2 +- test/spec/svg/midpoints.js | 2 +- test/spec/svg/points.js | 2 +- test/spec/svg/vertices.js | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/test/rendering.html b/test/rendering.html index 35d8d8dfa..cf32f9e15 100644 --- a/test/rendering.html +++ b/test/rendering.html @@ -147,7 +147,7 @@ .attr('width', 30) .attr('height', 40) .attr('data-zoom', function (d) { return d.zoom; }) - .call(iD.svg.Layers(context)) + .call(iD.svg.Layers(projection, context)) .each(function (d) { var n = node.update({tags: d}), graph = iD.Graph([n]); @@ -215,7 +215,7 @@ .attr('width', 30) .attr('height', 30) .attr('data-zoom', function (d) { return d.zoom; }) - .call(iD.svg.Layers(context)) + .call(iD.svg.Layers(projection, context)) .each(function (d) { var n = node.update({tags: d.tags}), graph = iD.Graph([n, way]); @@ -303,7 +303,7 @@ .attr('width', 200) .attr('height', 30) .attr('data-zoom', function (d) { return d.zoom; }) - .call(iD.svg.Layers(context)) + .call(iD.svg.Layers(projection, context)) .each(function (d) { var highway = way.update({tags: d.tags}), graph = iD.Graph([a, b, highway]); @@ -365,7 +365,7 @@ .append('svg') .attr('width', 100) .attr('height', 100) - .call(iD.svg.Layers(context)) + .call(iD.svg.Layers(projection, context)) .each(function (datum) { var area = way.update({tags: datum.tags}), graph = iD.Graph([a, b, c, d, area]); diff --git a/test/spec/svg/areas.js b/test/spec/svg/areas.js index 8e6d06fe3..7a43534a6 100644 --- a/test/spec/svg/areas.js +++ b/test/spec/svg/areas.js @@ -7,7 +7,7 @@ describe("iD.svg.Areas", function () { beforeEach(function () { surface = d3.select(document.createElementNS('http://www.w3.org/2000/svg', 'svg')) - .call(iD.svg.Layers(iD())); + .call(iD.svg.Layers(projection, iD())); }); it("adds way and area classes", function () { diff --git a/test/spec/svg/lines.js b/test/spec/svg/lines.js index 27fc0ec10..ab3942209 100644 --- a/test/spec/svg/lines.js +++ b/test/spec/svg/lines.js @@ -7,7 +7,7 @@ describe("iD.svg.Lines", function () { beforeEach(function () { surface = d3.select(document.createElementNS('http://www.w3.org/2000/svg', 'svg')) - .call(iD.svg.Layers(iD())); + .call(iD.svg.Layers(projection, iD())); }); it("adds way and line classes", function () { diff --git a/test/spec/svg/midpoints.js b/test/spec/svg/midpoints.js index 4d012aae3..6889521c2 100644 --- a/test/spec/svg/midpoints.js +++ b/test/spec/svg/midpoints.js @@ -7,7 +7,7 @@ describe("iD.svg.Midpoints", function () { beforeEach(function () { context = iD(); surface = d3.select(document.createElementNS('http://www.w3.org/2000/svg', 'svg')) - .call(iD.svg.Layers(context)); + .call(iD.svg.Layers(projection, context)); }); it("creates midpoint on segment completely within the extent", function () { diff --git a/test/spec/svg/points.js b/test/spec/svg/points.js index 38d043430..669a1771b 100644 --- a/test/spec/svg/points.js +++ b/test/spec/svg/points.js @@ -6,7 +6,7 @@ describe("iD.svg.Points", function () { beforeEach(function () { context = iD().presets(iD.data.presets); surface = d3.select(document.createElementNS('http://www.w3.org/2000/svg', 'svg')) - .call(iD.svg.Layers(context)); + .call(iD.svg.Layers(projection, context)); }); it("adds tag classes", function () { diff --git a/test/spec/svg/vertices.js b/test/spec/svg/vertices.js index 0eec0e45b..3e13daf8b 100644 --- a/test/spec/svg/vertices.js +++ b/test/spec/svg/vertices.js @@ -6,7 +6,7 @@ describe("iD.svg.Vertices", function () { beforeEach(function () { context = iD(); surface = d3.select(document.createElementNS('http://www.w3.org/2000/svg', 'svg')) - .call(iD.svg.Layers(context)); + .call(iD.svg.Layers(projection, context)); }); it("adds the .shared class to vertices that are members of two or more ways", function () {