UNPKG

fybdp-d3-kg

Version:

Knowledge Graph using React and D3.js

42 lines (41 loc) 1.22 kB
/** * Given a point position, get the closes data point in the dataset. */ export declare function getClosestPoint(pos: number, scale: any, data: any, attr?: string): any; /** * Given an event, get the parent svg element; */ export declare function getParentSVG(event: any): any; /** * Given an event, get the relative X/Y position for a target. */ export declare function getPositionForTarget({ target, clientX, clientY }: { target: any; clientX: any; clientY: any; }): { x: number; y: number; }; /** * Gets the point from q given matrix. */ export declare function getPointFromMatrix(event: any, matrix: any): { x: number; y: number; } | [number, number] | null; /** * Get the start/end matrix. */ export declare function getLimitMatrix(height: number, width: number, matrix: any): ({ x: number; y: number; } | [number, number])[]; /** * Constrain the matrix. */ export declare function constrainMatrix(height: number, width: number, matrix: any): boolean; /** * Determine if both min and max scale fctors are going out of bounds. */ export declare function isZoomLevelGoingOutOfBounds(value: any, scaleFactor: number): boolean;