-
Notifications
You must be signed in to change notification settings - Fork 5
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
Refactor/buffer canvas #133
Merged
Merged
Conversation
This file contains 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
…doesn't handle deletions that don't change the bbox
6 tasks
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.
Refactor/buffer canvas
Description
Refactor how spatial annotations are drawn and redrawn.
Previously, spatial annotations were all drawn on the front canvas for the active subtask. When an annotation was modified in any way, the only sure way to render that change was to completely clear the canvas of ALL annotations and then redraw ALL annotations. This inevitably leads to redrawing way more than what was theoretically necessary, and was a cause of considerable lag on annotation jobs with a large number of annotations.
This method of erasing the entire canvas and redrawing everything seems to be the state-of-the-art way to handle changes to the canvas, since erasing only specific annotations is not well supported at all.
This PR works around these quirks of canvases by creating a separate canvas for each spatial annotation. This way, when a given annotation is modified, we only have to erase that annotation's canvas, while leaving all other annotations unchanged. This greatly reduces the time spent redrawing, and provides a smoother experience in the case of many complex annotations.
Non-spatial annotations are left unchanged: they still are all drawn on the front canvas.
Additional minor changes:
resume_from
errors that arise from poorly formatted polygons.PR Checklist
package.json
has been bumped since last releasepackage.json
andsrc/version.js
npm install
andnpm run build
AFTER bumping the version numberapi_spec.md
)changelog.md
Breaking API Changes
No