Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Arrow snapping behavior redux#3090

Open
steveruizok wants to merge5 commits intomain
base:main
Choose a base branch
Loading
fromminor-arrow-improvements

Conversation

steveruizok
Copy link
Collaborator

@steveruizoksteveruizok commentedMar 9, 2024
edited
Loading

This PR makes a few small changes to arrow binding / center snapping. It incorporates some of the logic from#2924

It:

  • makes better use of pointer velocity when deciding whether to trigger an imprecise binding
  • incorporates the approximate "pointing-at-the-centerness" of the arrow when deciding whether to trigger an imprecise binding

Change Type

  • minor — New feature, though really this shouldn't break anything that isn't relying on quirks in our shapes / states

Test Plan

  1. Use the arrow tool.
  • Unit Tests

Release Notes

  • Improves the arrow shape's center-snapping logic

@huppy-bothuppy-botbot added the minorIncrement the minor version when merged labelMar 9, 2024
@vercelVercel
Copy link

vercelbot commentedMar 9, 2024
edited
Loading

The latest updates on your projects. Learn more aboutVercel for Git ↗︎

NameStatusPreviewUpdated (UTC)
examples✅ Ready (Inspect)Visit PreviewApr 29, 2024 9:27pm
tldraw-docs✅ Ready (Inspect)Visit PreviewApr 29, 2024 9:27pm

@steveruizoksteveruizok changed the titleArrow improvements[experiment] arrow improvementsMar 9, 2024
@steveruizoksteveruizok changed the title[experiment] arrow improvements[experiment] arrow snapping behavior 2Mar 9, 2024
@steveruizok
Copy link
CollaboratorAuthor

steveruizok commentedMar 10, 2024
edited
Loading

A key change here is making the "velocity at time of first binding" more decisive in whether to start in an imprecise or precise state. It's difficult to measure the "towards the centerness" of the arrow, but speed feels intentional (even on mobile). I also feel less in control of "time spent in the same binding". If we want to capture a "pause" intent, then we should start a timer whenever the velocity hits zeroish; and then I think we can reduce the amount of time it takes to trigger a pause.

Some of the "easy" actions are:

  • enter a shape
  • exit a shape
  • pause

The "harder" actions are:

  • point exactly at the center
  • point toward the center
  • control the velocity over time (ie keep the velocity slow while dragging inside of a bound shape)

By combining the harder intents with the easier actions, ie the velocity (or center-pointedness) at the time of entry, we can preserve the mode after that fact, and give a quick way of fixing the problem if in the wrong mode by leaving and re-entering, or by using a slightly less convenient mode (pausing, dragging to the center)

@steveruizoksteveruizok requested a review fromds300April 27, 2024 12:28
@steveruizoksteveruizok changed the title[experiment] arrow snapping behavior 2Arrow snapping behavior reduxApr 27, 2024
@steveruizok
Copy link
CollaboratorAuthor

Bringing this out of experiment hell, now that a few other things have landed. (And want to be sure to get it considered before we redo arrow bindings).

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@ds300ds300Awaiting requested review from ds300

Assignees
No one assigned
Labels
minorIncrement the minor version when merged
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant
@steveruizok

[8]ページ先頭

©2009-2025 Movatter.jp