def forget_tree(element_id, view)
      removed = forget_view(element_id, view)
      if view.subviews
        view.subviews.each do | sub |
          if (sub_ids = sub.motion_kit_meta[:motion_kit_ids])
            sub_ids.each do | sub_id |
              forget_tree(sub_id, sub) || []
            end
          end
        end
      end
      removed
    end
def forget_tree(element_id, view)
      removed = forget_view(element_id, view)
      if view.subviews
        view.subviews.each do | sub |
          if (sub_ids = sub.motion_kit_meta[:motion_kit_ids])
            sub_ids.each do | sub_id |
              forget_tree(sub_id, sub) || []
            end
          end
        end
      end
      removed
    end
def forget_tree ( element_id , view ) removed = forget_view ( element_id , view ) if view . subviews view . subviews . each do | sub | if ( sub_ids = sub . motion_kit_meta [ :motion_kit_ids ] ) sub_ids . each do | sub_id | forget_tree ( sub_id , sub ) || [ ] end end end end removed end
returns the root view that was removed, if any
returns the root view that was removed if any