I need this:
var text = new PointText({
point: [50, 50],
content: 'Text',
fillColor: 'black',
fontFamily: 'Courier New',
fontWeight: 'bold',
fontSize: 25
});
to be centered (x + y) in my canvas.
There is nothing special about the canvas.
The
view
object stores acenter
property which represents it's centre. So if you do this:It will be positioned in the centre of your canvas.
Here's the Sketch as well.