mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-15 21:48:20 +02:00
Add photo overlays used during editing to the "source" changeset tag (close #6279)
This commit is contained in:
@@ -86,6 +86,23 @@ export function uiCommit(context) {
|
||||
if (source) {
|
||||
tags.source = source;
|
||||
}
|
||||
var existingSources = (tags.source || '').split(';');
|
||||
// add the photo overlays used during editing as sources
|
||||
var photoOverlaysUsed = context.history().photoOverlaysUsed();
|
||||
if (photoOverlaysUsed.length) {
|
||||
// include this tag for any photo layer
|
||||
if (existingSources.indexOf('streetlevel imagery') === -1) {
|
||||
existingSources.push('streetlevel imagery');
|
||||
}
|
||||
}
|
||||
photoOverlaysUsed.forEach(function(photoOverlay) {
|
||||
if (existingSources.indexOf(photoOverlay) === -1) {
|
||||
existingSources.push(photoOverlay);
|
||||
}
|
||||
});
|
||||
if (existingSources.length) {
|
||||
tags.source = existingSources.join(';').substr(0, 255);
|
||||
}
|
||||
|
||||
_changeset = new osmChangeset({ tags: tags });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user