CompEvol / BeastFX

GUIs for BEAST using Java FX to make things more pretty.
GNU Lesser General Public License v2.1
4 stars 1 forks source link

Generalise Node.getLength() implementation #42

Closed rbouckaert closed 1 year ago

rbouckaert commented 1 year ago

The getLength() method in Node is final (not quite sure why), so cannot be overwritten. Its implementation uses getParent().height - height to calculate the length. Replacing this by getParent().getHeight() - getHeight() would allow classes derived from Node (like BinaryNode in the starbeast3 package) to implement its own heights on nodes.

rbouckaert commented 1 year ago

This should be in beast2: https://github.com/CompEvol/beast2/issues/1085