This repository has been archived by the owner on Feb 25, 2024. It is now read-only.
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.
Requested here: #225 (comment)
In the process, I've reused the
dragSessionTracker
in theResizableBox
. You can check out the commit history to see how this has progressed.Previously drag sessions could only be first started in the
dragSessionTracker
. In the canvas, there was always some kind of a step required before we have even entered a state with thedragSessionTracker
- either spacebar had to be pressed or we had to enter the pan mode using the hand icon. In theResizableBox
thedragSessionTracker
could be just invoked at the root of the machine there.How this has been organized in states made sense to me so I've decided to keep the overall structure of that. However, panning with the wheel didn't play out that well with this model - that's because pressing the wheel is also a "start" of the dragging session and yet when the wheel gets pressed we are not even in a state that has the
dragSessionTracker
installed.I've decided to add the ability to "seed" the
dragSessionTracker
with the session data given from the caller - this has allowed me to forward this to the tracker and leave the overall structure untouched.