Move inside div and center on div not page

Hi, i know how to move the canvas inside the div with .parent, but i cant seem to position the canvas centered on the div, when i use .position it uses the page coordinates not the div

var offsets = document.getElementById('sketch-holder').getBoundingClientRect();
var top =;
var left = offsets.left;

function setup() {

  var cnv = createCanvas(150, 150);
  var pos = cnv.parent('sketch-holder'); // Move the canvas so it’s inside our <div id="sketch-holder">.

  pos.position(10, 10);


  ellipse(36, 36, 72, 72); // (x, y, x:size, y:size)

Maybe invoking method p5.Element::center() might work: :straight_ruler:
createCanvas(150, 150).parent(sketch-holder).center();