set text anchor attribute to middle on non-leafs