The verticalAlign property of the text makes no sense to me.
The text is not kinetic. The container, instead of Kinetic.Shape.
IMO, Kinetic.Shape must not have vertialAlign. He, like a circle, has a verticalAlign. Compatible with what? matched with any container, layer or scene? what am i saying
That's why it is being deleted, I think, and hopefully these properties should be added back to the KineticContainer along with horizontalAlign.
If you want your text to be vertically aligned in a rectangle or circle. At this point, you need to set the y position of your text in order to vertically align it with your container.
If your container is 100 pixels high and your text is 30 pixels high, you will get a y position of 35.
var newY= (box.getHeight()-text.getHeight())/2 text.setY(newY); layer.draw();
source share