You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've got some problems trying to center a Text element in the canvas.
This next line doesn't seem to work, and I think it is valid code:
scoreboard = new jaws.Text({text: 'example', x: jaws.width/2, y: jaws.height/2, anchor: 'center'});
The solution was to avoid the use of the anchor tag (Text defaults it to 'top_left'), and center it manually hard coding the x value. Setting the value of y to 'jaws.height/2' worked.
I am not sure if there is a problem in jaws.Text or I am not using it correctly
I'm trying to use
jaws.Text
, but I cannot make it work and cannot find any example on how to use it :(Here's what I've tried so far (here's the jsfiddle)
What am I doing wrong? Thanks! :)
The text was updated successfully, but these errors were encountered: