chore(core): add labels to tuple

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
braks
2023-04-03 08:53:33 +02:00
committed by Braks
parent ef94e1ac19
commit 1212fac27b
4 changed files with 4 additions and 4 deletions
@@ -59,7 +59,7 @@ export function getBezierPath({
targetY, targetY,
targetPosition = Position.Top, targetPosition = Position.Top,
curvature = 0.25, curvature = 0.25,
}: GetBezierPathParams): [string, number, number, number, number] { }: GetBezierPathParams): [path: string, labelX: number, labelY: number, offsetX: number, offsetY: number] {
const [sourceControlX, sourceControlY] = getControlWithCurvature({ const [sourceControlX, sourceControlY] = getControlWithCurvature({
pos: sourcePosition, pos: sourcePosition,
x1: sourceX, x1: sourceX,
@@ -42,7 +42,7 @@ export function getSimpleBezierPath({
targetX, targetX,
targetY, targetY,
targetPosition = Position.Top, targetPosition = Position.Top,
}: GetSimpleBezierPathParams): [string, number, number, number, number] { }: GetSimpleBezierPathParams): [path: string, labelX: number, labelY: number, offsetX: number, offsetY: number] {
const [sourceControlX, sourceControlY] = getControl({ const [sourceControlX, sourceControlY] = getControl({
pos: sourcePosition, pos: sourcePosition,
x1: sourceX, x1: sourceX,
@@ -171,7 +171,7 @@ export function getSmoothStepPath({
centerX, centerX,
centerY, centerY,
offset = 20, offset = 20,
}: GetSmoothStepPathParams): [string, number, number, number, number] { }: GetSmoothStepPathParams): [path: string, labelX: number, labelY: number, offsetX: number, offsetY: number] {
const [points, labelX, labelY, offsetX, offsetY] = getPoints({ const [points, labelX, labelY, offsetX, offsetY] = getPoints({
source: { x: sourceX, y: sourceY }, source: { x: sourceX, y: sourceY },
sourcePosition, sourcePosition,
@@ -12,7 +12,7 @@ export function getStraightPath({
sourceY, sourceY,
targetX, targetX,
targetY, targetY,
}: GetStraightPathParams): [string, number, number, number, number] { }: GetStraightPathParams): [path: string, labelX: number, labelY: number, offsetX: number, offsetY: number] {
const [centerX, centerY, offsetX, offsetY] = getSimpleEdgeCenter({ const [centerX, centerY, offsetX, offsetY] = getSimpleEdgeCenter({
sourceX, sourceX,
sourceY, sourceY,