mirror of
https://github.com/FoggedLens/iD.git
synced 2026-03-28 15:00:35 +01:00
20 lines
442 B
JavaScript
20 lines
442 B
JavaScript
iD.presets.Field = function(id, field) {
|
|
field = _.clone(field);
|
|
|
|
field.id = id;
|
|
|
|
field.matchGeometry = function(geometry) {
|
|
return !field.geometry || field.geometry.indexOf(geometry) >= 0;
|
|
};
|
|
|
|
field.t = function(scope, options) {
|
|
return t('presets.fields.' + id + '.' + scope, options);
|
|
};
|
|
|
|
field.label = function() {
|
|
return field.t('label', {'default': id});
|
|
};
|
|
|
|
return field;
|
|
};
|