Merge pull request #8442 from openstreetmap/8441-move-rotate

In move/rotate cancel, check whether graph has changed before popping
This commit is contained in:
Milos Brzakovic
2021-06-22 11:15:56 +02:00
committed by GitHub
2 changed files with 4 additions and 3 deletions

View File

@@ -113,10 +113,10 @@ export function modeMove(context, entityIDs, baseGraph) {
function cancel() {
if (baseGraph) {
while (context.graph() !== baseGraph) context.pop();
while (context.graph() !== baseGraph) context.pop(); // reset to baseGraph
context.enter(modeBrowse(context));
} else {
context.pop();
if (_prevGraph) context.pop(); // remove the move
context.enter(modeSelect(context, entityIDs));
}
stopNudge();

View File

@@ -119,7 +119,7 @@ export function modeRotate(context, entityIDs) {
function cancel() {
context.pop();
if (_prevGraph) context.pop(); // remove the rotate
context.enter(modeSelect(context, entityIDs));
}
@@ -130,6 +130,7 @@ export function modeRotate(context, entityIDs) {
mode.enter = function() {
_prevGraph = null;
context.features().forceVisible(entityIDs);
behaviors.forEach(context.install);