Skip to content
This repository has been archived by the owner on Jul 29, 2019. It is now read-only.

Add arrow types for EndPoints.js #3839

Merged
merged 13 commits into from
Mar 31, 2018
Merged

Conversation

geminoa
Copy link

@geminoa geminoa commented Feb 24, 2018

Hi,

I updated EndPoints.js to add arrow types supported by graphviz.
https://www.graphviz.org/doc/info/arrows.html

It is mainly to fix a TODO in dotparser.js. This update adds arrowhead support.
// TODO: support for attributes 'dir' and 'arrowhead' (edge arrows)

However, I believe it is useful for users other than using dot language.

Thanks

As described in TODO, dotparser.js does not support 'arrowhead'
attribubte of edge.
This update is for adding 'dot' and 'tee'(bar) styles.
To support box arrowhead of graphviz, add Box endpoint class in
EndPoints.js and box attribute in dotparser.js.
To support diamond arrowhead of graphviz, add Diamond endpoint
class in EndPoints.js and diamond attribute in dotparser.js.
To support crow arrowhead of graphviz, add Crow endpoint
class in EndPoints.js and crow attribute in dotparser.js.
To support normal arrowhead of graphviz, add Triangle endpoint
class in EndPoints.js and normal attribute in dotparser.js.
To support curve arrowhead of graphviz, add Curve endpoint
class in EndPoints.js and curve attribute in dotparser.js.
To support inverted curve arrowhead of graphviz, add InvertedCurve
endpoint class in EndPoints.js and icurve attribute in
dotparser.js.
To support vee arrowhead of graphviz, add Vee endpoint class in
EndPoints.js and vee attribute in dotparser.js.
In createEdge(), accessing 'attr' causes an error if the edge has no
attribute and the value is null.
This update fixes bug for accessing null 'attr'.
Add followingn options for 'arrows.to.type'.

* box
* crow
* curve
* diamond
* inv_curve
* triangle
* inv_triangle
* vee
Add arrow types for the example.

'box', 'crow', 'curve', 'inv_curve', 'diamond', 'triangle',
'inv_triangle', 'vee'
Copy link
Member

@mojoaxel mojoaxel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yotamberk yotamberk merged commit 2cf2904 into almende:develop Mar 31, 2018
mojoaxel pushed a commit to visjs/vis_original that referenced this pull request Jun 9, 2019
* Add arrowhead support

As described in TODO, dotparser.js does not support 'arrowhead'
attribubte of edge.
This update is for adding 'dot' and 'tee'(bar) styles.

* Add example for arrow styles

* Add box arrowhead

To support box arrowhead of graphviz, add Box endpoint class in
EndPoints.js and box attribute in dotparser.js.

* Add diamond arrowhead

To support diamond arrowhead of graphviz, add Diamond endpoint
class in EndPoints.js and diamond attribute in dotparser.js.

* Add crow arrowhead

To support crow arrowhead of graphviz, add Crow endpoint
class in EndPoints.js and crow attribute in dotparser.js.

* Add normal arrowhead

To support normal arrowhead of graphviz, add Triangle endpoint
class in EndPoints.js and normal attribute in dotparser.js.

* Add curve arrowhead

To support curve arrowhead of graphviz, add Curve endpoint
class in EndPoints.js and curve attribute in dotparser.js.

* Add inverted curve arrowhead

To support inverted curve arrowhead of graphviz, add InvertedCurve
endpoint class in EndPoints.js and icurve attribute in
dotparser.js.

* Add vee arrowhead

To support vee arrowhead of graphviz, add Vee endpoint class in
EndPoints.js and vee attribute in dotparser.js.

* Add arrowhead examples

* Fix bug for accessing null attribute

In createEdge(), accessing 'attr' causes an error if the edge has no
attribute and the value is null.
This update fixes bug for accessing null 'attr'.

* Update description for arrows.to.type option

Add followingn options for 'arrows.to.type'.

* box
* crow
* curve
* diamond
* inv_curve
* triangle
* inv_triangle
* vee

* Update edgeStyle example for arrow types

Add arrow types for the example.

'box', 'crow', 'curve', 'inv_curve', 'diamond', 'triangle',
'inv_triangle', 'vee'
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants