UNPKG

phylogician-ts

Version:

Module to read, manipulate and write phylogenetic trees. Written in TypeScript

55 lines (54 loc) 1.38 kB
import { ISvgParams } from './interfaces'; import { Tree } from './Tree'; import { TreeLayout } from './TreeLayout'; import { LogLevelDescType } from 'loglevel-colored-prefix'; export declare class Vertical extends TreeLayout { private logger; constructor(tree: Tree, svgParams: ISvgParams, loglevel?: LogLevelDescType); /** * Calculates all parameters of the tree * * @param {boolean} scaling * @returns {this} * @memberof Vertical */ calcTree(scaling: boolean): this; /** * Calculates the position X of all nodes * * @param {boolean} [scaling=false] * @returns {this} * @memberof Vertical */ calcPosX(scaling?: boolean): this; /** * Calculates the position Y of all nodes * * @returns {this} * @memberof Vertical */ calcPosY(): this; /** * Calculates the branch path * * @returns {this} * @memberof Vertical */ calcBranchPath(): this; /** * Helper function to place label by the corresponding node * * @param {number} id * @returns {string} * @memberof Vertical */ labelPlace(id: number): string; /** * Helper function to determine the anchor of text * * @param {number} id * @returns {string} * @memberof Vertical */ labelAnchor(id: number): string; }