Open
Conversation
- Add UndoRedoManager class with action-based undo/redo system - Implement keyboard shortcuts: Ctrl+Z (undo), Ctrl+Y (redo) - Add toolbar buttons with proper state management - Add global flag to prevent adjustDocks during undo/redo - Support block stack detection and restoration - Ensure EaselJS compatible caching and rendering - Add comprehensive error handling with warnings Features: - Exact position restoration for blocks and connected stacks - Prevents recursive state saving during operations - Maintains block visibility and proper layering - Works with existing Music Blocks architecture - No breaking changes to existing functionality
- Save initial position on mousedown for undo/redo - Prevent adjustDocks during undo/redo operations - Save final position after block movement - Clear tracking variables after state save - Ensure proper integration with UndoRedoManager
Features: - Action-based undo/redo system (not full snapshots) - Keyboard shortcuts: Ctrl+Z (undo), Ctrl+Y (redo) - Toolbar buttons with proper state management - Block position detection and restoration - Prevents adjustDocks() during undo/redo operations - EaselJS compatible caching and rendering - Comprehensive error handling - No breaking changes to existing functionality The implementation maintains block visibility, supports connected block stacks, and integrates seamlessly with existing Music Blocks architecture.
Contributor
|
❌ Some Jest tests failed. Please check the logs and fix the issues before merging. Failed Tests: |
Author
|
having some issues the undo/redo is working but when i apply undo/redo not the whole move to its original place but just the top block i moved rest of it just stay in the same place any idea how to solve it @walterbender @zealot-zew |
Member
|
How does this mesh with #5481 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implement comprehensive undo/redo functionality for Music Blocks
🎯 Summary
This PR implements a complete undo/redo system for Music Blocks that allows users to easily revert and reapply block movements and other actions.
✨ Features Implemented
Core Functionality
Technical Features
Integration Points
🔧 Technical Implementation
Files Modified
Key Components
adjustDocks()during undo/redo🎮 User Experience
How It Works