store collapsed state in layer tree