transitive-js
Version:
A tool for generating dynamic stylized transit maps that are easy to understand.
48 lines (47 loc) • 1.2 kB
TypeScript
export default class Vertex {
/**
* Vertex constructor
*
* @param {Object} point the Point (a Stop, Place, etc.) attached to this vertex
* @param {Number} x
* @param {Number} y
*/
constructor(point: Object, x: number, y: number);
id: number;
point: Object;
x: number;
origX: number;
y: number;
origY: number;
edges: any[];
getId(): number;
getRenderX(display: any): any;
getRenderY(display: any): any;
/**
* Move to new coordinate
*
* @param {Number}
* @param {Number}
*/
moveTo(x: any, y: any): void;
/**
* Get array of edges incident to vertex. Allows specification of "incoming"
* edge that will not be included in results.
*
* @param {Edge} inEdge optional incoming edge tp ignore
*/
incidentEdges(inEdge: any): any[];
/**
* Add an edge to the vertex's edge list
*
* @param {Edge} edge
*/
addEdge(edge: any): void;
/**
* Remove an edge from the vertex's edge list
*
* @param {Edge} edge
*/
removeEdge(edge: any): void;
toString(): string;
}