Use screenToFlowPosition() instead of project() #2459
Merged
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.
Saw a react flow warning about project being deprecated, so i found the instances we were still using it and replaced them.
The functionality is a little different -- they automatically offset the viewport coordinates so you don't have to, which is nice for the few areas where we were doing that, but bad for the areas where we weren't doing that, so I adjusted and tested each of these scenarios.
Side note: I've had a reminder in my phone for about a year that just says "general file copy and paste" and I wasn't sure what that referred to until now. We hardcoded the schemaId for the load image node rather than implementing a general copy and paste feature like we did for drag and drop.