Hello Group !!
I have observed some weird behavior of the point text' s position property.
Please consider the following code -
const fontSize = 100;
const point = view.center;
const text = new PointText(point);
console.log("Initially",text.position);
text.content = "Say Something";
console.log("After Content",text.position);
text.fontSize = fontSize;
console.log("After fontSize",text.position);
text.leading = fontSize;
console.log("After leading",text.position);
text.justification = 'center';
console.log("After Justification",text.position);
let circle2 = new Path.Circle(text.position,8);
circle2.fillColor = new Color("yellow");
let circle1 = new Path.Circle(point,8);
circle1.fillColor = new Color("red");
I have added multiple console log to check how poinText's position is being changed during the assignment of properties.
Here are some snap of the results -
Result snap were Red circle is "Initial" position and yellow circle is "final" position .
Is this change in position expected ?
Is this a bug in paper.js ?
Thanks !!