How to set the position of any element? (for instance an accidental)

• Sep 25, 2012 - 12:20

Speaking of the "new" plugin architecture, how can I set the position of an element? setting the element.pos.x or element.pos.y seems to have no effect. For instance:

var accidental = note.accidental();
var value = accidental.pos.x;
accidental.pos.x = 1;
value = accidental.pos.x;

I get exactly the same value before and after setting the "pos.x" property (and no error message)

The "pos" object itself seems to have no properties; at least none is listed by:

var pos = accidental.pos;
for(var key in pos)
  console.log("" + key + ": " + pos[key]);

Any hint? Thanks,


Do you still have an unanswered question? Please log in first to post your question.