Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In move/rotate cancel, check whether graph has changed before popping #8442

Merged
merged 1 commit into from
Jun 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions modules/modes/move.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
3 changes: 2 additions & 1 deletion modules/modes/rotate.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

Expand All @@ -130,6 +130,7 @@ export function modeRotate(context, entityIDs) {


mode.enter = function() {
_prevGraph = null;
context.features().forceVisible(entityIDs);

behaviors.forEach(context.install);
Expand Down