-
Notifications
You must be signed in to change notification settings - Fork 0
Rescue operation #1
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
Closed
Closed
Conversation
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
- Add HEX/RGB/HSL conversions - Implement alpha channel support - Add color validation - Complete test coverage
substr method test(color): fix some tests
- Add core pixel tracking functionality - Include 22 unit tests for all methods - Document API usage in Markdown
refactor: deprecate validateColorArray
tests and documentation
- Converted Color class to be fully immutable (all properties private/frozen) - Added caching mechanism using static Map to reuse existing color instances - Implemented Symbol-keyed constructor to enforce factory pattern - Added validation for all color inputs (RGB, HSL, Hex) - Maintained all existing functionality (conversions, mixing, comparisons) - Added cache management methods (clearCache, cacheSize) - Updated tests to verify immutability and caching behavior Benefits: - Improved performance by avoiding duplicate color instances - Safer usage due to immutability - Maintained backward compatibility with existing API
- Added Color Class and DirtyRectangle as a composed dependancy in CanvasGrid - Modified initializeBlankCanvas, loadImage and setColor to utilize the new Color Class integration - Modified class constructor, initializeBlankCanvas and setColor methods to utilize the DirtyRectangle Class integration - Maintained existing pixel matrix API refactor: rename lastChange property and methods to ChangeBuffer - Added ColorClass as a composed dependancy in CanvasGrid - Modified initializeBlankCanvas, loadImage and setColor to utilize the new integeration - Maintained existing pixel matrix API doc: complete documentation for CanvasGrid class and add markdown jsdocs file test: update test suite for modified CanvasGrid API
- Fixed undo/redo edge cases and addActionGroup buffer management - Refactored circular buffer logic for clarity - Added comprehensive JSDoc with usage examples - Expanded test coverage for: - Buffer wraparound scenarios - Consecutive undo/redo operations - Action data shallow copying - Generated API documentation (jsdoc-to-markdown)
feat(color): add compositeOver method for compositing one color over another
of the input data, no copy is made
… of 10% and more edge cases, increasing number of tests to 57
test(pixel-layer): enhance existing weak tests and add more tests for edge cases and uncovered branches, with number of tests reaching 25 tests
- Renamed `ActionHistory` → `History` for broader use cases - Moved from `scripts/action-history.js` → `src/services/history.js` - Simplified API: - `addActionGroup()` → `addRecord()` - `addActionData()` → `setRecordData()` - Removed action group names (now ID-only) - Record data is now a generic object - Added `isStart`/`isEnd` getters for clearer state checks - Improved index wrapping logic with `#wrapIndex()` - Updated tests (moved/renamed test file accordingly) BREAKING CHANGES: - All `ActionHistory` imports must be updated to `History` - Method signatures changed (no more action group names)
…ling - Moved `pixel-layer.js` from `scripts/` to `src/core/layers/` - Replaced `ActionHistory` with generic `History` service - Added action lifecycle methods: - `startAction()` with timeout protection (default: 30s) - `endAction()` and `cancelAction()` for explicit control - Batched steps (max 10 steps or 100 changes) for performance - Improved undo/redo: - Auto-merges small steps before applying - Added safety checks for active actions - 1000-step cancellation: 384ms → 65ms - Memory footprint reduced by 30% for large actions - Stricter validation: - `setColor()` throws if called outside an action (unless `quietly: true`) - Added `isInAction` getter to check state BREAKING CHANGES: - `createAction()` → `startAction()` - `commitChange()` → `addActionStep()` - Requires `History` service instead of `ActionHistory`
…ve to services - Added: - `mergeInPlace()` for performance-critical mutable merges - `length` getter to check change count - Changed: - Moved from `scripts/` to `src/services/` (updated imports to `#`) - Tests: - Added tests for `mergeInPlace()` - Moved tests to `tests/services/`
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.
No description provided.