Skip to content
This repository has been archived by the owner on Feb 25, 2024. It is now read-only.

Andarist/wheel panning #269

Merged
merged 7 commits into from
Oct 20, 2021
Merged

Andarist/wheel panning #269

merged 7 commits into from
Oct 20, 2021

Conversation

Andarist
Copy link
Member

Requested here: #225 (comment)

In the process, I've reused the dragSessionTracker in the ResizableBox. 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 the dragSessionTracker - either spacebar had to be pressed or we had to enter the pan mode using the hand icon. In the ResizableBox the dragSessionTracker 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.

@changeset-bot
Copy link

changeset-bot bot commented Sep 15, 2021

🦋 Changeset detected

Latest commit: 0f8e205

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
xstate-viz-app Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Sep 15, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/statelyai/xstate-viz/99NuxMMMMjejmnAPEjLdfz5892FP
✅ Preview: https://xstate-viz-git-andarist-wheel-panning-statelyai.vercel.app

@mattpocock
Copy link
Contributor

This is neat stuff. Working well locally.

@Andarist Andarist merged commit 9f9b0de into dev Oct 20, 2021
@Andarist Andarist deleted the andarist/wheel-panning branch October 20, 2021 10:10
@github-actions github-actions bot mentioned this pull request Oct 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants