remove noexit=yes and fixme=continue when you continue a line (#9634)

This commit is contained in:
Kyℓe Hensel
2025-02-17 21:18:53 +11:00
committed by GitHub
parent 0fc978de45
commit 083d6d04fe
2 changed files with 20 additions and 0 deletions
+2
View File
@@ -43,6 +43,7 @@ _Breaking developer changes, which may affect downstream projects or sites that
* Linkify keys & tags in the preset docs from the wiki ([#10763], thanks [@k-yle])
* Allow broken (unclosed) areas to be continued ([#9635], thanks [@k-yle])
* Render `*_link` roads narrower than their "regular" counterpart ([#10722])
* remove `noexit=yes` and `fixme=continue` when you continue a line ([#9634], thanks [@k-yle])
#### :scissors: Operations
* Fix splitting of closed ways (or areas) when two or more split-points are selected
* Keep `red_turn:left/right` tags unchanged when reversing a way ([#10737], thanks [@burrscurr])
@@ -69,6 +70,7 @@ _Breaking developer changes, which may affect downstream projects or sites that
[#7381]: https://github.com/openstreetmap/iD/issues/7381
[#8911]: https://github.com/openstreetmap/iD/pull/8911
[#9634]: https://github.com/openstreetmap/iD/pull/9634
[#9635]: https://github.com/openstreetmap/iD/pull/9635
[#10003]: https://github.com/openstreetmap/iD/pull/10003
[#10648]: https://github.com/openstreetmap/iD/pull/10648
+18
View File
@@ -2,6 +2,7 @@ import { t } from '../core/localizer';
import { modeDrawLine } from '../modes/draw_line';
import { behaviorOperation } from '../behavior/operation';
import { utilArrayGroupBy } from '../util';
import { actionChangeTags } from '../actions';
export function operationContinue(context, selectedIDs) {
@@ -29,6 +30,23 @@ export function operationContinue(context, selectedIDs) {
var operation = function() {
var candidate = _candidates[0];
// remove fixme=continue or noexit=yes from the vertex.
const tagsToRemove = new Set();
if (_vertex.tags.fixme === 'continue') tagsToRemove.add('fixme');
if (_vertex.tags.noexit === 'yes') tagsToRemove.add('noexit');
if (tagsToRemove.size) {
context.perform((graph) => {
const newTags = { ..._vertex.tags };
for (const key of tagsToRemove) {
delete newTags[key];
}
return actionChangeTags(_vertex.id, newTags)(graph);
}, operation.annotation());
}
context.enter(
modeDrawLine(context, candidate.id, context.graph(), 'line', candidate.affix(_vertex.id), true)
);