mirror of
https://github.com/FoggedLens/iD.git
synced 2026-03-31 01:09:22 +02:00
Remove unused projection parameter
This commit is contained in:
@@ -3,7 +3,7 @@ import _ from 'lodash';
|
||||
Only operates on "area" ways
|
||||
*/
|
||||
|
||||
export function actionFlip(wayId, isVertical, projection) {
|
||||
export function actionFlip(wayId, isVertical) {
|
||||
|
||||
return function (graph) {
|
||||
const targetWay = graph.entity(wayId);
|
||||
|
||||
@@ -7,7 +7,7 @@ export function operationFlipHorizontal(selectedIDs, context) {
|
||||
|
||||
var operation = function() {
|
||||
context.perform(
|
||||
actionFlip(entityId, false, context.projection),
|
||||
actionFlip(entityId, false),
|
||||
t('operations.flipHorizontal.annotation')
|
||||
);
|
||||
};
|
||||
|
||||
@@ -7,7 +7,7 @@ export function operationFlipVertical(selectedIDs, context) {
|
||||
|
||||
var operation = function() {
|
||||
context.perform(
|
||||
actionFlip(entityId, true, context.projection),
|
||||
actionFlip(entityId, true),
|
||||
t('operations.flipVertical.annotation')
|
||||
);
|
||||
};
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
describe('iD.actionFlip', function() {
|
||||
var projection = d3.geoMercator();
|
||||
|
||||
it('flips horizontally - does not change graph length', function () {
|
||||
var graph = iD.Graph([
|
||||
@@ -10,7 +9,7 @@ describe('iD.actionFlip', function() {
|
||||
iD.Way({id: '-', nodes: ['a', 'b', 'c', 'd', 'a'], tags: { area: 'yes'}})
|
||||
]);
|
||||
|
||||
graph = iD.actionFlip('-', false, projection)(graph);
|
||||
graph = iD.actionFlip('-', false)(graph);
|
||||
|
||||
expect(graph.entity('-').nodes).to.have.length(5);
|
||||
});
|
||||
@@ -23,7 +22,7 @@ describe('iD.actionFlip', function() {
|
||||
iD.Node({id: 'd', loc: [0, 2]}),
|
||||
iD.Way({id: '-', nodes: ['a', 'b', 'c', 'd', 'a'], tags: { area: 'yes'}})
|
||||
]);
|
||||
graph = iD.actionFlip('-', false, projection)(graph);
|
||||
graph = iD.actionFlip('-', false)(graph);
|
||||
expect(graph.entity('a').loc[0]).to.equal(2); // A should be 2,0 now
|
||||
expect(graph.entity('b').loc[0]).to.equal(0); // B should be 0,0 now
|
||||
expect(graph.entity('c').loc[0]).to.equal(0); // C should be 0,2 now
|
||||
@@ -38,7 +37,7 @@ describe('iD.actionFlip', function() {
|
||||
iD.Node({id: 'd', loc: [0, 2]}),
|
||||
iD.Way({id: '-', nodes: ['a', 'b', 'c', 'd', 'a'], tags: { area: 'yes'}})
|
||||
]);
|
||||
graph = iD.actionFlip('-', false, projection)(graph);
|
||||
graph = iD.actionFlip('-', false)(graph);
|
||||
expect(graph.entity('a').loc[1]).to.equal(0); // A should be 2,0 now
|
||||
expect(graph.entity('b').loc[1]).to.equal(0); // B should be 0,0 now
|
||||
expect(graph.entity('c').loc[1]).to.equal(2); // C should be 0,2 now
|
||||
@@ -53,7 +52,7 @@ describe('iD.actionFlip', function() {
|
||||
iD.Node({id: 'd', loc: [0, 2]}),
|
||||
iD.Way({id: '-', nodes: ['a', 'b', 'c', 'd', 'a'], tags: { area: 'yes'}})
|
||||
]);
|
||||
graph = iD.actionFlip('-', true, projection)(graph);
|
||||
graph = iD.actionFlip('-', true)(graph);
|
||||
expect(graph.entity('a').loc[1]).to.equal(2); // A should be 0,2 now
|
||||
expect(graph.entity('b').loc[1]).to.equal(2); // B should be 2,2 now
|
||||
expect(graph.entity('c').loc[1]).to.equal(0); // C should be 2,0 now
|
||||
@@ -68,7 +67,7 @@ describe('iD.actionFlip', function() {
|
||||
iD.Node({id: 'd', loc: [0, 2]}),
|
||||
iD.Way({id: '-', nodes: ['a', 'b', 'c', 'd', 'a'], tags: { area: 'yes'}})
|
||||
]);
|
||||
graph = iD.actionFlip('-', true, projection)(graph);
|
||||
graph = iD.actionFlip('-', true)(graph);
|
||||
expect(graph.entity('a').loc[0]).to.equal(0); // A should be 0,2 now
|
||||
expect(graph.entity('b').loc[0]).to.equal(2); // B should be 2,2 now
|
||||
expect(graph.entity('c').loc[0]).to.equal(2); // C should be 2,0 now
|
||||
|
||||
Reference in New Issue
Block a user