p5.dom.js how to position checkbox label?

Hi all, [spoiler: newbie alert],

I create a checkbox cb using createCheckbox with a label argument. Then I try to position my checkbox+label using cb.position(x,y) but somewhat to my surprise only the actual checkbox changes place, the label on the other hand remains on its original position. What is the best way to reposition the label as well?

var cb;

function setup() {
  cb = createCheckbox('enabled', false);
}

function draw() {
  cb.position(400, 400);
}

Thanks! (I'm using p5.js v0.4.23 March 04, 2016 and p5.dom.js v0.2.9 March 3, 2016)

Answers

Sign In or Register to comment.