feat(image): Add support for region annotations on image files#508
Merged
jstoffan merged 1 commit intobox:masterfrom Jun 17, 2020
Merged
feat(image): Add support for region annotations on image files#508jstoffan merged 1 commit intobox:masterfrom
jstoffan merged 1 commit intobox:masterfrom
Conversation
jstoffan
commented
Jun 5, 2020
| } | ||
|
|
||
| this.getManagers(this.annotatedEl, referenceEl).forEach(manager => { | ||
| manager.style({ |
Collaborator
Author
There was a problem hiding this comment.
This feels a little sketchy to me and can probably be refined. Unfortunately, we're not able to rely on the position/size of a parent element for images, as the img tag itself is sized directly by the Preview SDK. This solution keeps the annotation rendering area (ba-Layer) in sync with the image element.
ConradJChan
reviewed
Jun 5, 2020
1 task
jstoffan
commented
Jun 6, 2020
jstoffan
commented
Jun 6, 2020
|
|
||
| export default class RegionManager implements BaseManager { | ||
| page: number; | ||
| location: number; |
Collaborator
Author
There was a problem hiding this comment.
I'm trying to de-emphasize the concept of pages within the annotator components. We may want to use these on non-paged files eventually.
6c23e6e to
f7635b9
Compare
433e9d7 to
a376936
Compare
a376936 to
0fe2f29
Compare
mickr
previously approved these changes
Jun 17, 2020
Collaborator
mickr
left a comment
There was a problem hiding this comment.
left a few comments but overall looks great!
0fe2f29 to
969a706
Compare
mickr
approved these changes
Jun 17, 2020
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 solution will correctly display rotated annotations when the underlying image is rotated. However, creating annotations when the image is rotated will lead to them being mispositioned. Supporting that case is more complex, so I'll tackle it in a follow-up patchset.
Todo