mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
### TL;DR Fix presentation mode space-drag interaction by disabling black background during panning and properly restoring presentation state. ### What changed? - Modified how the presentation tool handles state restoration after panning - Disabled black background during space-drag and middle-mouse panning in presentation mode - Fixed tool state management to properly restore presentation mode after space panning - Added direct modification of the current tool's activated options instead of triggering a full tool change ### How to test? 1. Create a frame in edgeless mode 2. Enter presentation mode 3. Press space and drag to pan around 4. Verify the black background disappears during panning 5. Verify presentation mode is properly restored after releasing space 6. Try the same with middle-mouse button dragging ### Why make this change? The black background in presentation mode was causing visibility issues during panning operations. Additionally, the presentation state wasn't being properly restored after space-drag panning. These changes improve the user experience by making content visible during navigation while maintaining the presentation mode state. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Presentation mode now automatically hides the black background overlay when dragging with the space key or middle mouse button, improving visibility during navigation. - **Bug Fixes** - Improved handling of tool switching after panning in presentation mode, ensuring smoother transitions and state restoration. - **Tests** - Added an end-to-end test to verify that the black background is hidden during space-drag actions in presentation mode. <!-- end of auto-generated comment: release notes by coderabbit.ai -->