src/collection.js
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
  };
}
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
  };
}
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 } ; }
Get the rendered position of the midpoint
Get the rendered position of the midpoint