-
Notifications
You must be signed in to change notification settings - Fork 170
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
Undo/Redo Feature for Mantis #379
Conversation
This feature is for Mantis, I think we need to move more code related to undo/redo from Example project into Mantis to make undo/redo easier to use. |
We may need to add some properties in Config enable/disable undo/redo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
I added some comments. Please take a look.
- added "enableUndo" flag in Config - undo/redo/reset logic checks the "enableUndo" flag in cropViewController to enable functionality - abstracted the TransformRecord logic into the CropViewController class - removed UIButtons from TransformDelegate - moved TransformDelegate in to new file in the Protocols folder
All comments/issues have been addressed. |
…enableUndo" is false in Config file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the quick update.
I added more comments. Please take a look.
- More private variables. - Embedded controller uses proxy functions to communicate with CropViewController state. - Defaults function implementations in delegate methods.
latest comments addressed |
Thanks for the quick fixes! |
- TransformStack.swift - TransformRecord.swift - TransformDelegate.swift
Added new files to Mantis.xcodeproj |
- cropViewControllerDidUpdateEnableStateForUndo(_ enable: Bool) -> cropViewController(_ cropViewController: CropViewController, didUpdateEnableStateForUndo enable: Bool) - cropViewControllerDidUpdateEnableStateForRedo(_ enable: Bool) -> cropViewController(_ cropViewController: CropViewController, didUpdateEnableStateForRedo enable: Bool) - cropViewControllerDidUpdateEnableStateForReset(_ enable: Bool) -> cropViewController(_ cropViewController: CropViewController, didUpdateEnableStateForReset enable: Bool)
Fixed unit test in Mantis.xcodeproj related to new API for undo/redo feature. |
… viewModel's cropBoxFrame to the transform.maskFrame
…er and in to TransformStack class
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
Thanks for your work!
This is the Undo/Redo feature for Mantis.