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

Fixes #29 - Add undo #65

Merged
merged 4 commits into from
Oct 24, 2021
Merged

Fixes #29 - Add undo #65

merged 4 commits into from
Oct 24, 2021

Conversation

tuanthanh2067
Copy link
Contributor

Users are able to control z to get back to their preview settings

One more thing, can you label this as hacktoberfest

@NotWoods NotWoods changed the title Issue 29 Fixes #29 - Add undo Oct 10, 2021
Copy link
Owner

@NotWoods NotWoods left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer to have a single undo stack rather than 1 stack per layer. Currently, switching to a different layer and pressing undo will only undo changes on that layer.

I'd like these steps to work:

  1. Change X position of Background layer
  2. Add new layer
  3. Press undo
  4. See X position of Background layer reset

Would also be nice if add/delete layer could be undone. I'm OK leaving that for another PR.

src/editor/history.js Outdated Show resolved Hide resolved
src/editor/layer.js Outdated Show resolved Hide resolved
copyLayer
);

historyList = new Array();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
historyList = new Array();
historyList = [initialHistory];

Copy link
Owner

@NotWoods NotWoods left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much for all the work here! It's a really cool new feature

@NotWoods NotWoods merged commit f867058 into NotWoods:main Oct 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants