When user clicks on tag, he wants to go for its childs. Therefore middle layer must turn into foreground layer.
Transition logics:
User clicks on some tag.
Tag childs data is requested from server (up to 20 nodes).
Transition occurs.
Foreground layer gets removed with some sort of pretty transition.
New data is joined with nodes of the middle layer - node coordinates do not change!
Middle layer gets classed as foreground layer.
New middle layer is created.
Brand new middle and foreground layers get initialised, thus overall state of the program become identic to before-the-click state (except for represented data).
When user clicks on tag, he wants to go for its childs. Therefore middle layer must turn into foreground layer.
Transition logics: