mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 01:02:58 +00:00
Pass projection to iD.svg.Layers in tests
This commit is contained in:
@@ -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]);
|
||||
|
||||
@@ -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 () {
|
||||
|
||||
@@ -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 () {
|
||||
|
||||
@@ -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 () {
|
||||
|
||||
@@ -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 () {
|
||||
|
||||
@@ -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 () {
|
||||
|
||||
Reference in New Issue
Block a user