Share the post "How To Vertical Align Text In Famo.us Surface"
The guys in the chatroom of #famous specifically sunrising and talves helped me out in setting the vertical alignment of a text inside a Surface.
The key here is the lineHeight property. Take this Javascript code for example:
|
1 2 3 4 5 6 7 8 9 10 |
new Surface({ size: [150, 200], content: 'Sample text', properties: { color: 'white', textAlign: 'center', backgroundColor: 'black', lineHeight:'100px' } }); |
Take note there is no attribute to setting the vertical alignment in Famo.us. This is the only way to do it.