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

Bezier curve and arrow #1735

Open
zillionare opened this issue Jul 6, 2024 · 2 comments
Open

Bezier curve and arrow #1735

zillionare opened this issue Jul 6, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@zillionare
Copy link

Is your feature request related to a problem? Please describe.

As an instructor, I heavily utilize Slidev and have even self-taught myself to create many components. I desire a feature that, since it's already built-in, I hope the official team can expand upon. This component is the Arrow. When we use an Arrow, we must define its start and end points, which is perfectly reasonable, but it often requires several adjustments to accurately position it. Could the component be designed to be draggable, outputting its coordinates to the console each time it's moved (or alternatively, displaying them on screen based on an option)? This way, the author could write these coordinates into the slides.

Describe the solution you'd like

  1. when define an Arrow, if there's no coordinates specified, make the Arrow draggable
  2. when the Arrow is dragged, show its coordinates on the console
  3. or, controlled by an option, output the coordinates on the screen. By default the option is off.
  4. even more, allow add control point and make the line is a bezier curve

Describe alternatives you've considered
NA

@zillionare zillionare added the enhancement New feature or request label Jul 6, 2024
@KermanX
Copy link
Member

KermanX commented Jul 6, 2024

The draggable feature has been implemented: https://sli.dev/guide/draggable.html#draggable-arrow

@zillionare
Copy link
Author

This is amazing! I had read the part in the doc before, but I don't find when and where to use it. Actually your guys implemention is better than I can imaging. I don't know the data points can be synced back directly.

If I'd like to implement another one, how could I do this(sync data to slides editor)?

By the way, any possibility to add Bezier curve controls? which will make the curve look very much sexier.

@KermanX KermanX changed the title dragable Arrow and output coordinates Bezier curve and arrow Jul 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants