fix: Preview did not draw correctly when dragging Grids#1183
Merged
mofojed merged 2 commits intodeephaven:mainfrom Mar 30, 2023
Merged
fix: Preview did not draw correctly when dragging Grids#1183mofojed merged 2 commits intodeephaven:mainfrom
mofojed merged 2 commits intodeephaven:mainfrom
Conversation
- When we drag something, there is a frame where the width/height is 0 - We didn't update the metrics within the actual animation frame, so it was drawing the wrong thing - Fix so metrics are always updated in the animation frame, and also to only check the metrics with the previously checked metrics
Collaborator
|
There's a bit of weirdness when the dragged table is narrower than the preview window. Same thing happens when the table is shorter than the preview window. I'm guessing the metrics are being calculated based on the container and not the drag preview. If those dimensions are easy enough to get/pass into the metric calculation then let's do that. If not, I would be ok with the current fix Screen.Recording.2023-03-29.at.1.53.34.PM.mov |
mattrunyon
requested changes
Mar 29, 2023
- When the drag was started, it was calling `contentItem.setSize()`, but that was having no effect as the item wasn't attached to the DOM when it was called - Add the element to the DOM first and then set the size right away
Member
Author
|
Good catch. Now the dragging element resizes correctly! Looks much better when dragging, instead of just being cut off. Plots resize as well. |
mattrunyon
approved these changes
Mar 30, 2023
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Uh oh!
There was an error while loading. Please reload this page.