expand and collapse nodes
changes from mapjs