export function computedMenuPosition({ width, height, position, size }) {
  let x, y;
  x = position[0];
  y = position[1];
  if (width - x < size.w) {
    x = width - size.w;
  }
  if (height - y < size.h) {
    y = height - size.h;
  }
  return {
    x,
    y
  };
}
