export function getArrowSize()

in src/helpers/edge-helpers.js [247:267]


export function getArrowSize(viewWrapperElem: HTMLDivElement) {
  const defEndArrowElement: any = viewWrapperElem.querySelector(
    `defs>marker>.arrow`
  );

  const arrowRect = defEndArrowElement.getBoundingClientRect();
  const size = {
    bottom: arrowRect.bottom,
    top: arrowRect.top,
    // Firefox doesn't calculate width and height, so we need to pull
    // from the attributes.
    height: arrowRect.height || defEndArrowElement.getAttribute('height'),
    width: arrowRect.width || defEndArrowElement.getAttribute('width'),
    left: arrowRect.left,
    right: arrowRect.right,
    y: arrowRect.y,
    x: arrowRect.x,
  };

  return size;
}