import { Class_LinkElement } from './Link'; import { Class_Handler } from './Handler'; import { Class_DrawingArea } from '../types/DrawingArea'; export declare class LinkControlPoints { private link; /** * Struct of all control points * @private * @type {{ * starting_curve_point: Class_Handler, * ending_curve_point: Class_Handler, * starting_bezier_point: Class_Handler, * ending_bezier_point: Class_Handler, * middle_recycling_point: Class_Handler, * is_dragged: boolean * }} * @memberof Class_LinkElement */ private _control_points; /** * opensankey#1301 — poignées des points de contrôle libres (waypoints), une par * entrée de link.shape_waypoints. Reconstruites quand le nombre change (insertion/ * suppression), sinon réutilisées (l'index i ↔ waypoint i, ordre préservé). */ private _waypoint_handles; constructor(link: Class_LinkElement, drawing_area: Class_DrawingArea); createInternalAccess(): { controlPoints: () => { starting_curve_point: Class_Handler; ending_curve_point: Class_Handler; starting_bezier_point: Class_Handler; ending_bezier_point: Class_Handler; middle_recycling_point: Class_Handler; is_dragged: boolean; }; }; protected initControlPoints(drawing_area: Class_DrawingArea): { starting_curve_point: Class_Handler; ending_curve_point: Class_Handler; starting_bezier_point: Class_Handler; ending_bezier_point: Class_Handler; middle_recycling_point: Class_Handler; is_dragged: boolean; }; /** * Function that unDraw CP, in case we go throught link unDraw without erasing visible CP * * @memberof Class_LinkElement */ unDrawControlPoints(): void; drawControlPoint(): void; /** * Define deletion behavior * @memberof Class_LinkElement */ cleanForDeletion(): void; /** Le flux a-t-il des waypoints éditables ? (pas en mode recyclage). */ private hasEditableWaypoints; /** Retire les poignées de waypoints du DOM et vide le cache. */ private undrawWaypointHandles; /** Crée une poignée de waypoint liée à l'index i. */ private createWaypointHandler; /** * Aligne le nombre de poignées sur le nombre de waypoints (reconstruction si le * compte a changé, pour garder l'index i correct après insertion/suppression), * positionne et dessine chacune, et branche le clic droit = suppression. */ private syncAndDrawWaypointHandles; /** Ajoute une petite croix rouge cliquable pour supprimer le waypoint d'index i. */ private appendDeleteCross; /** Snapshot des waypoints (copie profonde) pour l'historique. */ private cloneWaypoints; private waypointDragStart; private waypointDragEnd; private waypointDragEvent; /** Supprime le waypoint d'index i (avec undo/redo). */ removeWaypoint(i: number): void; /** * Branche Alt+clic sur le tracé du flux (.link_path / .link_shape) pour insérer * un point de contrôle à la position du curseur, sur le segment le plus proche. */ bindWaypointInsertion(): void; private insertWaypointAtEvent; get control_points_position(): { starting_curve: number[]; ending_curve: number[]; starting_bezier: number[]; ending_bezier: number[]; middle_recycling: number[]; }; /** * Compute position of these points : * - Starting tangeant first & second point * - Ending tangeant first & second point * @memberof Class_LinkElement */ computeControlPoints(): void; /** * Function used to update starting curve point position value * * @private * @memberof Class_LinkElement */ private computeStartingCurvePoint; /** * Function used to update ending curve point position value * * @private * @memberof Class_LinkElement */ private computeEndingCurvePoint; /** * Function used to update starting tangeant point position value * * @private * @memberof Class_LinkElement */ private computeStartingBezierPoint; /** * Function used to update ending tangeant point position value * * @private * @memberof Class_LinkElement */ private computeEndingBezierPoint; private computeMiddleRecyclingPoint; /** * Activate the control points alignement guide * * @private * @return {*} * @memberof Class_LinkElement */ private dragHandleStart; /** * Deactivate the control points alignement guide * @private * @return {*} * @memberof Class_LinkElement */ private dragHandleEnd; /** * Function called when we drag the starting curve point, it update variable shape_starting_curve * * @private * @param {d3.D3DragEvent} event * @memberof Class_LinkElement */ private startCurvePointDragEvent; /** * Function called when we drag the ending curve point, it update variable shape_ending_curve * * @private * @param {d3.D3DragEvent} event * @memberof Class_LinkElement */ private endCurvePointDragEvent; /** * Function called when we drag the starting tangeant point, it update variable shape_starting_tangeant * * @private * @param {d3.D3DragEvent} event * @memberof Class_LinkElement */ private startTangeantDragEvent; /** * Function called when we drag the ending tangeant point, it update variable shape_ending_tangeant * * @private * @param {d3.D3DragEvent} event * @memberof Class_LinkElement */ private endTangeantDragEvent; private middleRecyclingDragEvent; }