ChangeEntityTags -> ChangeTags

This commit is contained in:
John Firebaugh
2013-01-31 12:07:54 -05:00
parent 6f7079d11c
commit df72ef254f
3 changed files with 4 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
iD.actions.ChangeEntityTags = function(entityId, tags) {
iD.actions.ChangeTags = function(entityId, tags) {
return function(graph) {
var entity = graph.entity(entityId);
return graph.replace(entity.update({tags: tags}));

View File

@@ -13,7 +13,7 @@ iD.modes.Select = function(entity, initial) {
function changeTags(d, tags) {
if (!_.isEqual(entity.tags, tags)) {
mode.history.perform(
iD.actions.ChangeEntityTags(d.id, tags),
iD.actions.ChangeTags(d.id, tags),
t('operations.change_tags.annotation'));
}
}

View File

@@ -1,8 +1,8 @@
describe("iD.actions.ChangeEntityTags", function () {
describe("iD.actions.ChangeTags", function () {
it("changes an entity's tags", function () {
var entity = iD.Entity(),
tags = {foo: 'bar'},
graph = iD.actions.ChangeEntityTags(entity.id, tags)(iD.Graph([entity]));
graph = iD.actions.ChangeTags(entity.id, tags)(iD.Graph([entity]));
expect(graph.entity(entity.id).tags).to.eql(tags);
});
});