code: function getRenderedMidpoint(target){
    let p = target.midpoint();
    let pan = target.cy().pan();
    let zoom = target.cy().zoom();
  
    return {
      x: p.x * zoom + pan.x,
      y: p.y * zoom + pan.y
    };
  }
docs: Get the rendered position of the midpoint