MCPcopy
hub / github.com/zcreativelabs/react-simple-maps / createConnectorPath

Function createConnectorPath

src/utils.js:73–78  ·  view source on GitHub ↗
(dx = 30, dy = 30, curve = 0.5)

Source from the content-addressed store, hash-verified

71}
72
73export function createConnectorPath(dx = 30, dy = 30, curve = 0.5) {
74 const curvature = Array.isArray(curve) ? curve : [curve, curve]
75 const curveX = (dx / 2) * curvature[0]
76 const curveY = (dy / 2) * curvature[1]
77 return `M${0},${0} Q${-dx / 2 - curveX},${-dy / 2 + curveY} ${-dx},${-dy}`
78}
79
80export function isString(geo) {
81 return typeof geo === "string"

Callers 1

Annotation.jsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…