UNPKG

mapeo-id-bmf

Version:

iD Editor for osm-p2p & mapeo-desktop changed to meet requirements of Bruno Manser Fonds

13 lines (10 loc) 439 B
export function actionChangePreset(entityId, oldPreset, newPreset) { return function(graph) { var entity = graph.entity(entityId), geometry = entity.geometry(graph), tags = entity.tags; if (oldPreset) tags = oldPreset.removeTags(tags, geometry); if (newPreset) tags = newPreset.applyTags(tags, geometry); return graph.replace(entity.update({tags: tags})); }; }