mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 01:02:58 +00:00
ChangeEntityTags -> ChangeTags
This commit is contained in:
@@ -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}));
|
||||
@@ -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'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user