ogallagher / fxgraph

A JavaFX graph editor
Do What The F*ck You Want To Public License
2 stars 0 forks source link

Create constants for edge, cell, arrow implementations #9

Open ogallagher opened 2 years ago

ogallagher commented 2 years ago

Currently the defaults for arrow length and width on a directed edge are hard-coded into one of the constructors:

https://github.com/ogallagher/fxgraph/blob/ec8beb49c2e95224e3413103241f9ee20fc1f466/src/main/java/com/fxgraph/graph/Arrow.java#L19-L23

It could be better to create constants in the Arrow class to hold these values instead, so they can be referenced and documented easily.

ogallagher commented 2 years ago

Similarly, the RectangleCell and TriangleCell classes have default sizes and colors, and RandomLayout uses a 500x500 default graph size for cell placement.