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

Idea: Arrows #40

Open
beeing opened this issue Jun 14, 2020 · 7 comments
Open

Idea: Arrows #40

beeing opened this issue Jun 14, 2020 · 7 comments

Comments

@beeing
Copy link

beeing commented Jun 14, 2020

Hi, thanks for this great library. I've been searching for hand drawn arrow for many years and this looks a great potential to do it.

Arrows

Will be useful for libraries such as tourjs or introjs.

Thanks!

@pshihn
Copy link
Collaborator

pshihn commented Jun 14, 2020

I had thought of arrows. Never hashed out the details of it though .
From an API perspective should the arrow go from one element to another?
Describing all the properties of the arrow - shape, direction, thickness, length, etc

@beeing
Copy link
Author

beeing commented Jun 15, 2020

Hi @pshihn, the easiest is to go from one element to the other and then add thing incrementally.

Since your API is based on object, it is quite extensible. I would think the API would be something like:

annotate(e, {
  type: 'arrow',
  from: 'element'
});

that will draw a straight arrow, or with more options:

annotate(e, {
  type: 'arrow',
  from: 'element',
  bents: [['10%', +10, -20]],
  start: () => {},
  end: () => {}
});

Just a sketchy idea. Thanks.

@Leecason
Copy link

RoughAnnotationConfig should be the common properties, and those arrow only properties maybe should be wrapped in arrowOptions ?

@pshihn
Copy link
Collaborator

pshihn commented Jun 16, 2020

There are a lot of things to consider if arrow is "bound" to 2 elements. As the elements move around or change in size due to layout, updating the arrow could be tricky.

A simpler first step would be to just annotate arrows bound an element. Specify direction and length.

It would be nice to document some discrete examples or use cases for this.

@feliperaul
Copy link

Just wanted to say how awesome this would be.

@Bevebage
Copy link

+1

@lucasverra
Copy link

i like this!

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

No branches or pull requests

6 participants