Code Monkey home page Code Monkey logo

Comments (7)

pshihn avatar pshihn commented on July 26, 2024 3

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.

from rough-notation.

pshihn avatar pshihn commented on July 26, 2024

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

from rough-notation.

beeing avatar beeing commented on July 26, 2024

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.

from rough-notation.

Leecason avatar Leecason commented on July 26, 2024

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

from rough-notation.

feliperaul avatar feliperaul commented on July 26, 2024

Just wanted to say how awesome this would be.

from rough-notation.

Bevebage avatar Bevebage commented on July 26, 2024

+1

from rough-notation.

lucasverra avatar lucasverra commented on July 26, 2024

i like this!

from rough-notation.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.