Pass projection to iD.svg.Layers in tests

This commit is contained in:
Bryan Housel
2016-06-10 13:06:28 -04:00
parent 6314c276e8
commit e22bd1eceb
6 changed files with 9 additions and 9 deletions

View File

@@ -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]);

View File

@@ -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 () {

View File

@@ -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 () {

View File

@@ -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 () {

View File

@@ -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 () {

View File

@@ -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 () {