How to align disconnected nodes

Hi, great GoJSer. I am using TreeLayout. There is a requirement want to make new dropped nodes align to their neighboring nodes vertically to the same x-axis position. My idea about implementing this feature is: find out these nodes’ closest node and get their x-axis value and use it to these new dropped nodes.

Any idea about how to achieve this behavior? Some API references?

Could you please show before and after screenshots of what you want? And how is your TreeLayout defined now?