Function cardinalPosition

Returns a {x,y} Point on a cardinal position of element.

// Top edge, middle horizontal position
const pos = cardinalPosition(`#blah`, `n`);
  • Parameters

    Returns Point