src/collection.js
function getRenderedCenter(target, renderedDimensions){
  let pos = target.renderedPosition();
  let dimensions = renderedDimensions(target);
  let offsetX = dimensions.w / 2;
  let offsetY = dimensions.h / 2;

  return {
    x : (pos.x - offsetX),
    y : (pos.y - offsetY)
  };
}
function getRenderedCenter(target, renderedDimensions){
  let pos = target.renderedPosition();
  let dimensions = renderedDimensions(target);
  let offsetX = dimensions.w / 2;
  let offsetY = dimensions.h / 2;

  return {
    x : (pos.x - offsetX),
    y : (pos.y - offsetY)
  };
}
function getRenderedCenter ( target , renderedDimensions ) { let pos = target . renderedPosition ( ) ; let dimensions = renderedDimensions ( target ) ; let offsetX = dimensions . w / 2 ; let offsetY = dimensions . h / 2 ; return { x : ( pos . x - offsetX ) , y : ( pos . y - offsetY ) } ; }
Get the rendered center
Get the rendered center