Pass entity directly

This commit is contained in:
John Firebaugh
2013-03-21 14:59:12 -07:00
parent 87a4d60030
commit 96056c5c0a
2 changed files with 2 additions and 10 deletions
+1 -8
View File
@@ -1,6 +1,5 @@
iD.ui.preset = function(context) {
iD.ui.preset = function(context, entity) {
var event = d3.dispatch('change', 'setTags', 'close'),
entity,
tags,
keys,
preset,
@@ -126,11 +125,5 @@ iD.ui.preset = function(context) {
return presets;
};
presets.entity = function(_) {
if (!arguments.length) return entity;
entity = _;
return presets;
};
return d3.rebind(presets, event, 'on');
};
+1 -2
View File
@@ -73,8 +73,7 @@ iD.ui.TagEditor = function(context, entity) {
changeTags({ name: name.property('value') });
});
presetUI = iD.ui.preset(context)
.entity(entity)
presetUI = iD.ui.preset(context, entity)
.preset(preset)
.on('change', changeTags)
.on('close', event.close);