Node resizer#540
Merged
harbournick merged 15 commits intosuperdoc-dev:developfrom Jun 16, 2025
Merged
Conversation
Contributor
Author
|
I am not sure why these tests are failing. They don't seem to be directly related to this code. If the overall approach of this is OK, I can try to add tests. I am not sure it will be possible to do the dragging with automatic tests. If it is not, I can make those tests be manual. |
Contributor
artem-harbour
left a comment
There was a problem hiding this comment.
Added my comments to the PR.
@harbournick - please review as well.
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.
I've tried a number of different things and finally found that this general solution should be the most versatile. By using the bounding box and placing the resizer controls somewhere else in the document, it should work with arbitrary element types. However, it does require for there to be size attributes on the node that is to change in size.
I have enabled it to be used on images in this PR. Field annotations seem to lack such size attributes for now. Should they be added @harbournick ?