diff --git a/combobox.html b/combobox.html
index 914d834e7..c739f4898 100644
--- a/combobox.html
+++ b/combobox.html
@@ -84,7 +84,7 @@
-
+
diff --git a/index.html b/index.html
index defb5403b..87e93c643 100644
--- a/index.html
+++ b/index.html
@@ -85,7 +85,7 @@
-
+
diff --git a/js/id/actions/reverse_way.js b/js/id/actions/reverse.js
similarity index 98%
rename from js/id/actions/reverse_way.js
rename to js/id/actions/reverse.js
index 160017637..5c8315467 100644
--- a/js/id/actions/reverse_way.js
+++ b/js/id/actions/reverse.js
@@ -27,7 +27,7 @@
http://wiki.openstreetmap.org/wiki/Route#Members
http://josm.openstreetmap.de/browser/josm/trunk/src/org/openstreetmap/josm/corrector/ReverseWayTagCorrector.java
*/
-iD.actions.ReverseWay = function(wayId) {
+iD.actions.Reverse = function(wayId) {
var replacements = [
[/:right$/, ':left'], [/:left$/, ':right'],
[/:forward$/, ':backward'], [/:backward$/, ':forward']
diff --git a/js/id/operations/reverse.js b/js/id/operations/reverse.js
index 77bacc64e..f750c134d 100644
--- a/js/id/operations/reverse.js
+++ b/js/id/operations/reverse.js
@@ -3,7 +3,7 @@ iD.operations.Reverse = function(selection, context) {
var operation = function() {
context.perform(
- iD.actions.ReverseWay(entityId),
+ iD.actions.Reverse(entityId),
t('operations.reverse.annotation'));
};
diff --git a/test/index.html b/test/index.html
index ceb1e7fbc..512a1ee1e 100644
--- a/test/index.html
+++ b/test/index.html
@@ -81,7 +81,7 @@
-
+
@@ -150,7 +150,7 @@
-
+
diff --git a/test/index_packaged.html b/test/index_packaged.html
index 050badd7d..5adaf06f6 100644
--- a/test/index_packaged.html
+++ b/test/index_packaged.html
@@ -43,7 +43,7 @@
-
+
diff --git a/test/spec/actions/reverse_way.js b/test/spec/actions/reverse.js
similarity index 76%
rename from test/spec/actions/reverse_way.js
rename to test/spec/actions/reverse.js
index ca61cb778..40d0f5500 100644
--- a/test/spec/actions/reverse_way.js
+++ b/test/spec/actions/reverse.js
@@ -1,9 +1,9 @@
-describe("iD.actions.ReverseWay", function () {
+describe("iD.actions.Reverse", function () {
it("reverses the order of nodes in the way", function () {
var node1 = iD.Node(),
node2 = iD.Node(),
way = iD.Way({nodes: [node1.id, node2.id]}),
- graph = iD.actions.ReverseWay(way.id)(iD.Graph([node1, node2, way]));
+ graph = iD.actions.Reverse(way.id)(iD.Graph([node1, node2, way]));
expect(graph.entity(way.id).nodes).to.eql([node2.id, node1.id]);
});
@@ -11,7 +11,7 @@ describe("iD.actions.ReverseWay", function () {
var way = iD.Way({tags: {'highway': 'residential'}}),
graph = iD.Graph([way]);
- graph = iD.actions.ReverseWay(way.id)(graph);
+ graph = iD.actions.Reverse(way.id)(graph);
expect(graph.entity(way.id).tags).to.eql({'highway': 'residential'});
});
@@ -19,7 +19,7 @@ describe("iD.actions.ReverseWay", function () {
var way = iD.Way({tags: {'oneway': 'yes'}}),
graph = iD.Graph([way]);
- graph = iD.actions.ReverseWay(way.id)(graph);
+ graph = iD.actions.Reverse(way.id)(graph);
expect(graph.entity(way.id).tags).to.eql({'oneway': 'yes'});
});
@@ -27,10 +27,10 @@ describe("iD.actions.ReverseWay", function () {
var way = iD.Way({tags: {'cycleway:right': 'lane'}}),
graph = iD.Graph([way]);
- graph = iD.actions.ReverseWay(way.id)(graph);
+ graph = iD.actions.Reverse(way.id)(graph);
expect(graph.entity(way.id).tags).to.eql({'cycleway:left': 'lane'});
- graph = iD.actions.ReverseWay(way.id)(graph);
+ graph = iD.actions.Reverse(way.id)(graph);
expect(graph.entity(way.id).tags).to.eql({'cycleway:right': 'lane'});
});
@@ -38,10 +38,10 @@ describe("iD.actions.ReverseWay", function () {
var way = iD.Way({tags: {'maxspeed:forward': '25'}}),
graph = iD.Graph([way]);
- graph = iD.actions.ReverseWay(way.id)(graph);
+ graph = iD.actions.Reverse(way.id)(graph);
expect(graph.entity(way.id).tags).to.eql({'maxspeed:backward': '25'});
- graph = iD.actions.ReverseWay(way.id)(graph);
+ graph = iD.actions.Reverse(way.id)(graph);
expect(graph.entity(way.id).tags).to.eql({'maxspeed:forward': '25'});
});
@@ -49,10 +49,10 @@ describe("iD.actions.ReverseWay", function () {
var way = iD.Way({tags: {'incline': 'up'}}),
graph = iD.Graph([way]);
- graph = iD.actions.ReverseWay(way.id)(graph);
+ graph = iD.actions.Reverse(way.id)(graph);
expect(graph.entity(way.id).tags).to.eql({'incline': 'down'});
- graph = iD.actions.ReverseWay(way.id)(graph);
+ graph = iD.actions.Reverse(way.id)(graph);
expect(graph.entity(way.id).tags).to.eql({'incline': 'up'});
});
@@ -60,10 +60,10 @@ describe("iD.actions.ReverseWay", function () {
var way = iD.Way({tags: {'incline': 'up'}}),
graph = iD.Graph([way]);
- graph = iD.actions.ReverseWay(way.id)(graph);
+ graph = iD.actions.Reverse(way.id)(graph);
expect(graph.entity(way.id).tags).to.eql({'incline': 'down'});
- graph = iD.actions.ReverseWay(way.id)(graph);
+ graph = iD.actions.Reverse(way.id)(graph);
expect(graph.entity(way.id).tags).to.eql({'incline': 'up'});
});
@@ -71,16 +71,16 @@ describe("iD.actions.ReverseWay", function () {
var way = iD.Way({tags: {'incline': '5%'}}),
graph = iD.Graph([way]);
- graph = iD.actions.ReverseWay(way.id)(graph);
+ graph = iD.actions.Reverse(way.id)(graph);
expect(graph.entity(way.id).tags).to.eql({'incline': '-5%'});
- graph = iD.actions.ReverseWay(way.id)(graph);
+ graph = iD.actions.Reverse(way.id)(graph);
expect(graph.entity(way.id).tags).to.eql({'incline': '5%'});
way = iD.Way({tags: {'incline': '.8°'}});
graph = iD.Graph([way]);
- graph = iD.actions.ReverseWay(way.id)(graph);
+ graph = iD.actions.Reverse(way.id)(graph);
expect(graph.entity(way.id).tags).to.eql({'incline': '-.8°'});
});
@@ -88,10 +88,10 @@ describe("iD.actions.ReverseWay", function () {
var way = iD.Way({tags: {'sidewalk': 'right'}}),
graph = iD.Graph([way]);
- graph = iD.actions.ReverseWay(way.id)(graph);
+ graph = iD.actions.Reverse(way.id)(graph);
expect(graph.entity(way.id).tags).to.eql({'sidewalk': 'left'});
- graph = iD.actions.ReverseWay(way.id)(graph);
+ graph = iD.actions.Reverse(way.id)(graph);
expect(graph.entity(way.id).tags).to.eql({'sidewalk': 'right'});
});
@@ -99,7 +99,7 @@ describe("iD.actions.ReverseWay", function () {
var way = iD.Way({tags: {'maxspeed:forward': '25', 'maxspeed:backward': '30'}}),
graph = iD.Graph([way]);
- graph = iD.actions.ReverseWay(way.id)(graph);
+ graph = iD.actions.Reverse(way.id)(graph);
expect(graph.entity(way.id).tags).to.eql({'maxspeed:backward': '25', 'maxspeed:forward': '30'});
});
@@ -108,10 +108,10 @@ describe("iD.actions.ReverseWay", function () {
relation = iD.Relation({members: [{type: 'way', id: way.id, role: 'forward'}]}),
graph = iD.Graph([way, relation]);
- graph = iD.actions.ReverseWay(way.id)(graph);
+ graph = iD.actions.Reverse(way.id)(graph);
expect(graph.entity(relation.id).members[0].role).to.eql('backward');
- graph = iD.actions.ReverseWay(way.id)(graph);
+ graph = iD.actions.Reverse(way.id)(graph);
expect(graph.entity(relation.id).members[0].role).to.eql('forward');
});
});