Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change move*To commands to use points #2987

Closed
ianstormtaylor opened this issue Aug 28, 2019 · 1 comment
Closed

change move*To commands to use points #2987

ianstormtaylor opened this issue Aug 28, 2019 · 1 comment

Comments

@ianstormtaylor
Copy link
Owner

Do you want to request a feature or report a bug?

Debt / improvement.

What's the current behavior?

Right now we have move*To commands like moveAnchorTo:

editor.moveAnchorTo([0, 2], 27)

They take a (path, offset) signature. But they only do that because they were made before Point was introduced. Instead, once we've removed keys, they should take (point):

editor.moveAnchorTo(point)

And if you want to specify an offset by hand you can just do:

editor.moveAnchorTo({ path: point.path, offset: 42 })

Or even:

editor.moveAnchorTo({ ...point, offset: 42 })
@ianstormtaylor
Copy link
Owner Author

Fixed by #3093.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant