UNPKG

@sanity/assist

Version:

You create the instructions; Sanity AI Assist does the rest.

10 lines (8 loc) 333 B
import {ConnectorOptions} from '../../_lib/connector' export function arrowPath(options: ConnectorOptions, x: number, y: number, dir: 1 | -1): string { return [ `M ${x - options.arrow.size} ${y - options.arrow.size * dir} `, `L ${x} ${y}`, `L ${x + options.arrow.size} ${y - options.arrow.size * dir}`, ].join('') }