Feature: Remember, save, and load highlights across slides - #352
Open
NattXCZ wants to merge 2 commits into
Open
Conversation
…and the ability to save and load it to/from a file
Owner
|
Hmmm I always wanted the highlighting to be saved in the pdf as annotations rather than a separate file. But that might not be the most reasonable (I think it's not doable with the popper api atm). This is a useful enough feature I think that a clean implementation of a semi-readable file next to the pdf could be acceptable. |
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.
This Pull Request introduces a new functionality to remember, save, and load drawings (highlights) across presentation slides. Previously, the application only offered basic drawing capabilities where strokes were automatically cleared upon transitioning to another slide, without any option to keep them.
.pdf.jsonfile located in the same directory as the presentation.scribble_cache), which required regeneration every time the window was resized. The new version stores all data as normalized vectors.Available Modes:
Technical Details:
document.py: Added the scribble_data_path method to locate the path to the save file.scribble.py: Implemented methods for reading and writing the JSON file. This includes the use of a temporary file to prevent data loss during saving.ui.py: Added calls to these save/load methods during slide changes and document open/close events.remembered_scribblesdata structure with a per page structure that is used across all drawing modes. The key for this structure is either an integer slide index (for global and per-page modes) or a label (for per-label mode).